From 9b4656c35b7f983590a6c70f9abceec214e798b8 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 6 Jan 2025 13:33:08 -0500 Subject: [PATCH 01/58] merges spells into one tab --- maplestation.dme | 11 +- .../magic/spellbook/spellbook_categories.dm | 3 + .../spellbook/items/spellbook_cantrips.dm | 224 ++++++++++++++++++ .../spellbook/spellbook_manager.dm | 3 + 4 files changed, 231 insertions(+), 10 deletions(-) create mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm diff --git a/maplestation.dme b/maplestation.dme index f073cbd17427..92a8ac627e6c 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6305,17 +6305,8 @@ #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_helpers.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_item_customization_menu.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_manager.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_cantrips.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_entry.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_aeromancy.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_cryokinesis.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_electrokinesis.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_geomancy.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_healing.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_hydrokinesis.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_lumenomancy.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_misc.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_thaumaturgy.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_thermokinesis.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_spell_entry.dm" #include "maplestation_modules\code\modules\client\verbs\looc.dm" #include "maplestation_modules\code\modules\clothing\digi_clothing.dm" diff --git a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm index 6fc1cc6d778f..ce2e450dfffc 100644 --- a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm +++ b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm @@ -8,3 +8,6 @@ #define SPELLBOOK_CATEGORY_ELECTROKINESIS "Electrokinesis" #define SPELLBOOK_CATEGORY_LIFE_MAGIC "Life Magic" #define SPELLBOOK_CATEGORY_MISC "Misc. Spells" + +// todo: clear out the above +#define SPELLBOOK_CATEGORY_CANTRIPS "Cantrips" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm new file mode 100644 index 000000000000..611a3f08b37e --- /dev/null +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm @@ -0,0 +1,224 @@ +GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CATEGORY_CANTRIPS)) + +/datum/spellbook_item/spell/acid_touch + name = "Acid Touch" + description = "Empowers your finger with a sticky acid, melting anything (or anyone) you touch." + lore = "A very volatile spell which has resulted in many a wizard accidentily melting off their own hands. \ + The acid generated is comparable to that of sulfuric acid.\nThis has led to the spell gaining wide use \ + in the criminal underworld, as it is a very effective way to make entrances or exits, dispose of evidence, \ + or create a distraction." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/touch/acid_touch + +/datum/spellbook_item/spell/airhike + name = "Air hike" + description = "Force wind beneath one's feet for a boost of movement where one is facing to jump over 2 tiles or to jump up a Zlevel and a tile ahead." + lore = "A somewhat intermediate spell not from its complexity, but applying proper force that won't have the user spin out of control. \ + A spell that is often grown out of due to its unwieldly application, at least for aeromancers, it is known as a party trick or crude application in the magic community, but it is useful in a pinch.\n\ + A common experiment for early aeromancers after wondering if applying force to oneself is possible. Those that learn through experimentation require training to consistantly control it, eventually moving onto finer control or dropping it after one too many crashes.\n\ + Most scholars might prefer students not to spend too much time blasting themselves wildly due to injuries slowing down or stopping proper study.\n\ + If given a proper clear area, some might argue its a safe way to explain distance, the idea of self as a target, and points of force which can be applied to spells that require finesse.\n\ + The name was given due to mages that appeared to walk on air itself, and like climbing a mountain side, if caution is not taken would be fatigued and fall from their height." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/airhike + +/datum/spellbook_item/spell/convect + name = "Convect" + description = "Manipulate the temperature of anything you can touch." + lore = "Often considered the precursor to all thermal magic, convect is one of the most important fundumentals of thermokinesis. \ + An extremely common spell, at least for thermomancers, it is well known among the wider magic community and rather typical.\n\ + Latently available to some, with that latency being why it's so common. Those that learn through the latency typically require training to consistantly control it.\n\ + This latency, linked with it's relative simplicity of casting, causes stories of previous thaumic blanks suddenly bursting into flames/\ + freezing themselves (often due to intense emotion, though triggers can be diverse) to be common among the magic community.\n\ + While exceptions exist, most users can only manipulate temperature in the direction of their thermokinetic school/predisposition (fire/ice or both)." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/convect + +/datum/spellbook_item/spell/finger_flame + name = "Finger Flame" + description = "With a snap, conjures a small flame at the tip of your fingers." + lore = "More of a party trick than a real spell, Finger Flame is known far and wide as the showiest trick in a thermomancer's book. \ + While not particularly useful, it's a fantastic way to get attention, intimidate someone, demonstrate your powers, or light a cigarette.\n\ + Its low potency makes Finger Flame hardly expensive or tiresome to cast and maintain, \ + making it a good way to practice your control over fire (or rather, to practice avoiding burning yourself)." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/touch/finger_flame/mana + +/datum/spellbook_item/spell/conjure_item/flare + name = "Flare" + description = "Conjure lumens into a glob to be held or thrown to light an area." + lore = "A simple application of lumenomancy, although quite complex enough for those new to magic to have the resulting globule sustain itself for so long. \n\ + An extremely common spell, used to gauge a child's power if they are able to even emit a moment of light, it is well known among the wider magic community.\n\ + Effort is taken to understand lumens and conjuring it out of mana. Those that study might prefer to focus on another school of magic, causing them to skip proper flare casting.\n\ + A relatively safe spell that dissipates by itself under normal circumstances, the nebulous construct leaves no residue so clean up isn't needed.\n\ + Considered to be a helpful spell, its short lived life is mostly used to help locate more permanent lighting options.\n\ + Those interested in the lumenomancy school/predisposition use this spell to further their understanding of luminosity and their ability to warp its directions." + + category = SPELLBOOK_CATEGORY_CANTRIPS + has_params = TRUE + + our_action_typepath = /datum/action/cooldown/spell/conjure_item/flare +// Customization to allow lesser flare +/datum/spellbook_item/spell/conjure_item/flare/generate_customization_params() + . = list() + .["lesser"] = new /datum/spellbook_customization_entry/boolean("lesser", "Lesser, weaker, somewhat cheaper version", "A cheap less lasting flare that fizzles out faster than normally, along with a considerable cooldown between casts, for those just learning magic or unable to grasp the full concept of luminosity.") + + +/datum/spellbook_item/spell/freeze_person + name = "Freeze Person" + description = "A well known and effective spell that encases your victim in a block of enchanted ice." + lore = "Iconic and infamous, Freeze Person has been used to great effect to solidify opponents, victims, and other targets of mages for centuries.\ + Though it is quite useful to stop someone in their tracks, the ice around them is resistant enough to protect them from incoming attacks.\ + Just be careful you know exactly what this spell is before casting it." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/freeze_person + +/datum/spellbook_item/spell/healing_touch + name = "Healing Touch" + description = "Lay your hands upon a target to heal their wounds." + lore = "Often called for the action taken while invoking, \"Lay on Hands\", this spell is a staple of any healer's arsenal. \ + Healing Touch is often used by chaplains and priests to aid the ailing and wounded they encounter in their duties. \ + However, that's not to say that its use is exclusively for the holy, as some medical practitioners \ + (especially those who find themselves on the frontier, where supplies are scarce) \ + have been known to utilize it occasionally to expedite their work - \ + though many still find physical tools or chemicals to be more reliable, and thus, it's use is not as common as one might think." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/touch/healing_touch + +/datum/spellbook_item/spell/ice_blast + name = "Ice Blast" + description = "An incantation to summon a condensed energy proejctile made out of ice. On contact with anything, it'll cover the nearby surfaces with a thin layer of ice." + lore = "The favored tool of Frost Mages, Clowns, and Frost Clowns, Ice Blasts are quick and easy ways of inconveniencing an area for slip and slides alike." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/projectile/ice_blast + +/datum/spellbook_item/spell/ice_knife + name = "Ice Knife" + description = "Conjures an ice knife at will in your hands." + lore = "A spell not commonly practiced by followers of Cryokinesis for the fact that the knife's durability is much less desirable than a real one, some still sought to learn it for the sake of self defense. \ + Even then, the knife does not hold well on it's own and will eventually dissapear as to preserve mana." + + category = SPELLBOOK_CATEGORY_CANTRIPS + has_params = TRUE + + our_action_typepath = /datum/action/cooldown/spell/conjure_item/ice_knife + +/datum/spellbook_item/spell/ice_knife/generate_customization_params() + . = list() + .["ice_blade"] = new /datum/spellbook_customization_entry/boolean("ice_blade", "Ice Armblade Variant", "Construct a blade around your arm, in exchange of harming you in the process.") + +/datum/spellbook_item/spell/illusion + name = "Illusion" + description = "Summon an illusionary clone of yourself at the target location. Looks identical to you, \ + but will not hold up to physical scrutiny. Has a long range, but lasts for only a short time, and is less effective in darker areas." + lore = "Sometimes known as \"Mirror Image\" by more advanced pracitioners, Illusion is a well practiced spell which bends the light \ + in such a way to create an almost perfect copy of the caster. Of course, being effectively an advanced trick of the light, \ + the illusion is not capable of much besides being used to confuse and distract or otherwise look pretty." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/illusion + +/datum/spellbook_item/spell/mage_hand + name = "Mage Hand" + description = "Magically manipulate an item from a distance." + lore = "The favorite of lazy magicians and tricksters alike, \ + Mage Hand is a simple spell that allows the caster to manipulate an item from a distance. \ + The spell is often used to retrieve items that are out of reach, play pranks on unsuspecting victims, \ + press some buttons on a distant keyboard, or to simply avoid having to get up from a comfortable chair.\n\ + Due to its simplicity, the spell is often taught to the young as a first spell - and due to this commonality, \ + it is very easily recognized by most." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/apply_mutations/mage_hand + + +/datum/spellbook_item/spell/mana_sense + name = "Mana Sense" + description = "Sense other mana pools present" + lore = "Using your magical attunement (or other aptitudes) \ + you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ + Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense + +/datum/spellbook_item/spell/meditate + name = "Magic Meditation" + description = "Use mental focus to draw mana within yourself" + lore = "The most basic method of regenerating mana on your own. \ + Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ + Do note that this will take a while between casts, and you should still find other methods of regeneration." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/meditate + +/datum/spellbook_item/spell/shock_touch + name = "Shocking Grasp" + description = "Empower your hand to deliver a shock to your target. \ + While the zap is not powerful enough to stun or kill, it will cause them to drop their held items - or restart a stopped heart." + lore = "A spell which has gained notoriety for its utility in the medical field. \ + Many wizards have found use in it, to jolt a patient out of a coma, or to restart a heart which has stopped beating. \ + However, it is also a favorite of clowns, who use it as a less-obvious joybuzzer.\n\n\ + Oddly, some Geneticists have found latent genes in their test subjects which allow them to use a similar ability, \ + without the need for learning any magic or using any mana. It has yet to be determined if humanoidkind has an innate, untapped ability \ + to manipulate electricity that this spell and the genetic ability are tapping into, or if it is simply a coincidence." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/touch/shock/magical + +/datum/spellbook_item/spell/soothe + name = "Soothe" + description = "Attempt to soothe a target, stopping them from feeling rage, fear, doubt, or similar emotions for a short time. \ + This effect can be resisted by sentient targets, but also works on more simple-minded creatures." + lore = "A spell that is often used by by clergical figures, psychologists, or nurses to calm down those who cannot be reasoned with \ + due to its ability to provide tranquility to those in a state of panic or fear. \n\ + Likewise, those who work with animals may use it to pacify a rampaging beast or settle a frightened pet.\n\ + However, its ability to be resisted by sentient creatures who are in extreme mental duress, especially anger, \ + means it is not always reliable - and thus - conventional methods are often preferred." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/soothe_target + +/datum/spellbook_item/spell/soft_and_wet + name = "Water Control" + description = "Wet a dry spot, or dry a wet spot, from a distance. \ + Wetting a requires a water source - you can draw upon condensation in your surroundings, or supply your own." + lore = "Quite a mundane spell, Water Control does just that - control water, in whatever form it may be in. Except ice. \ + It allows you to break apart water molecules into vapor or condense them into liquid. \ + Hydromancers are often seen using this spell to put out fires, much to the chagrin of thermomancers." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/soft_and_wet + + +/* /datum/spellbook_item/spell/leyline_charge + name = "Leyline Charge" + description = "Draw mana straight from the leylines themselves." + lore = "The most basic method of regenerating mana on your own. \ + Casting this invocation- while focusing- will allow you to regain mana from the leylines themselves. \ + Do not that this is a finnicky way of regaining mana, and you risk overloading if done improperly." + + category = SPELLBOOK_CATEGORY_MISC + + our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weirda diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm index 74cd823bf7f5..1a9378357a32 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm @@ -141,6 +141,8 @@ // - Read the spellbook_item documentation to see what the entries do var/list/spellbook_tabs = list() + spellbook_tabs += list(list("name" = "Cantrips", "title" = "Simple spells that require little preparation or components to cast", "contents" = list_to_data(GLOB.spellbook_cantrip_items))) + /* spellbook_tabs += list(list("name" = "Aeromancy", "title" = "Items related to manipulation of air and motion", "contents" = list_to_data(GLOB.spellbook_aeromancy_items))) spellbook_tabs += list(list("name" = "Cryokinesis", "title" = "Items related to manipulation of ice", "contents" = list_to_data(GLOB.spellbook_cryokinesis_items))) spellbook_tabs += list(list("name" = "Thermokinesis", "title" = "Items related to manipulation of temperature", "contents" = list_to_data(GLOB.spellbook_thermokinesis_items))) @@ -150,6 +152,7 @@ spellbook_tabs += list(list("name" = "Electrokinesis", "title" = "Items related to manipulation of electricity", "contents" = list_to_data(GLOB.spellbook_electrokinesis_items))) spellbook_tabs += list(list("name" = "Life Magic", "title" = "Items related to Life and Healing magic", "contents" = list_to_data(GLOB.spellbook_healing_items))) spellbook_tabs += list(list("name" = "Misc. Spells", "title" = "Other miscellaneous spells, not associated with any attunements", "contents" = list_to_data(GLOB.spellbook_misc_items))) + */ data["spellbook_tabs"] = spellbook_tabs From 77b2f34f387e0a2b12d38e1b182567f939ed5321 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 1 Jun 2025 16:45:38 -0400 Subject: [PATCH 02/58] first commit, changes meditation --- .../modules/magic/story_spells/mana_charge.dm | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index 693616165df5..4d2e7a2db6c4 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -47,6 +47,7 @@ cooldown_time = 4 MINUTES invocation_type = INVOCATION_NONE spell_requirements = NONE + var/base_mana_recharge = 40 // the mana this recharges before a random varience invocation = "Focus...." invocation_type = INVOCATION_WHISPER @@ -57,12 +58,51 @@ if (!cast_on.mana_pool) cast_on.balloon_alert(cast_on, "no mana pool!") return + +/datum/action/cooldown/spell/meditate/cast(mob/living/cast_on) + . = ..() to_chat(cast_on, span_alert("You begin focusing your mind on manipulating ambient mana.")) if(!do_after(cast_on, channel_time)) // don't want this casted mid combat return . | SPELL_CANCEL_CAST + var/randy_value = rand(0,25) + var/mana_to_gain = randy_value + base_mana_recharge + cast_on.mana_pool.adjust_mana(mana_to_gain) -/datum/action/cooldown/spell/meditate/cast(mob/living/cast_on) +// recover mana using your own blood. no protections from using this at low blood volume. +/datum/action/cooldown/spell/lesser_splattercasting + name = "Lesser Splattercasting" + desc = "Drain some of your own blood to recover mana. This does not prevent you from bleeding out." + button_icon = 'icons/effects/effects.dmi' + button_icon_state = "plasmasoul" + sound = 'sound/magic/staff_healing.ogg' + + school = SCHOOL_UNSET // no idea where this would go tbh + cooldown_time = 2 MINUTES // shorter as its not from no where + invocation_type = INVOCATION_NONE + spell_requirements = NONE + var/base_mana_recharge = 50 + var/base_bloodloss = 65 // the blood drained before a random variable is added. + + invocation = "Vy'Thr" + invocation_type = INVOCATION_WHISPER + var/channel_time = 10 SECONDS + +/datum/action/cooldown/spell/lesser_splattercasting/before_cast(mob/living/cast_on) + . = ..() + if (!cast_on.mana_pool) + cast_on.balloon_alert(cast_on, "no mana pool!") + return + if (HAS_TRAIT(cast_on, TRAIT_NOBLOOD)) + cast_on.balloon_alert(cast_on, "no blood to use!") + return + +/datum/action/cooldown/spell/lesser_splattercasting/cast(mob/living/cast_on) . = ..() + to_chat(cast_on, span_alert("You prepare an incantation to trade some of your blood for mana.")) // TODO + if(!do_after(cast_on, channel_time)) // don't want this casted mid combat + return . | SPELL_CANCEL_CAST var/randy_value = rand(0,25) - var/mana_to_gain = randy_value + 40 + var/blood_drain = base_bloodloss + randy_value + var/mana_to_gain = randy_value + base_mana_recharge + cast_on.blood_volume -= blood_drain cast_on.mana_pool.adjust_mana(mana_to_gain) From 679a8f5e9b39eb8db3c84fc1b65a950802783d42 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 7 Jul 2025 16:56:21 -0400 Subject: [PATCH 03/58] first main commit --- .../code/__DEFINES/magic/magic_defines.dm | 2 +- .../magic/mana/sources/altars/nature_stone.dm | 20 +++++++++++++++++++ .../mana/sources/altars/psychic_chamber.dm | 13 ++++++++++++ .../magic/mana/sources/mana_batteries.dm | 6 +++--- 4 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm create mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm diff --git a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm index 58869e1b1d22..8c337d777259 100644 --- a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm +++ b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm @@ -7,7 +7,7 @@ #define MANA_CRYSTAL_BASE_RECHARGE 0.001 #define BASE_MANA_CAPACITY 1000 -#define MANA_CRYSTAL_BASE_MANA_CAPACITY (BASE_MANA_CAPACITY * 0.2) +#define MANA_CRYSTAL_BASE_MANA_CAPACITY (BASE_MANA_CAPACITY * 0.3) #define CARBON_BASE_MANA_CAPACITY (BASE_MANA_CAPACITY) #define LEYLINE_BASE_CAPACITY 600 //todo: standardize diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm new file mode 100644 index 000000000000..67eced4a54ed --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm @@ -0,0 +1,20 @@ +// nature shrine, consumes flowers to generate mana. +// this lists of flowers based on the amount of mana generated + +#define NATURE_SHRINE_MANA_LOW list( + /obj/item/food/grown/poppy, +) +#define NATURE_SHRINE_MANA_LOW_COUNT = 10 + +#define NATURE_SHRINE_MANA_MED list( + /obj/item/food/grown/poppy/lily, + /obj/item/food/grown/poppy/geranium, + +) +#define NATURE_SHRINE_MANA_MED_COUNT = 20 + +#define NATURE_SHRINE_MANA_HIGH list( + /obj/item/food/grown/poppy/geranium/fraxinella, + /obj/item/food/grown/poppy/lily/trumpet, +) +#define NATURE_SHRINE_MANA_HIGH_COUNT = 30 diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm new file mode 100644 index 000000000000..421e9bf81c43 --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm @@ -0,0 +1,13 @@ +/obj/structure/closet/psychicchamber + name = "psychic energy accumulation chamber" + desc = "A specialized psychic chamber (locker) lined with magic materials (reflective metals and trace volite) made to amplify and collect the psychic energy emanated by your brain (make you instensely hallucinate and regenerate mana reserves)" + icon_state = "abductor" + icon_door = "abductor" + can_weld_shut = FALSE + door_anim_time = 0 + +/obj/structure/closet/psychicchamber/proc/apply_effects(mob/living/target) + if(!target.incapacitated(IGNORE_STASIS)) // CHANGE THIS TO CHECK THINGS THAT WOULD PREVENT YOU FROM GETTING GEEKED + target.apply_status_effect(/datum/status_effect/grouped/stasis, REF(src)) + to_chat(target, span_notice("You feel a cold, numbing sensation...")) + //RegisterSignal(target, COMSIG_LIVING_EARLY_UNARMED_ATTACK, PROC_REF(skip_to_attack_hand)) diff --git a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm index 47f9999e7708..10bcade10f9d 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm @@ -122,10 +122,10 @@ /datum/mana_pool/mana_star // a special type of mana battery that regenerates passively- but cannot be given mana - maximum_mana_capacity = 400 // 400 by default - softcap = 400 + maximum_mana_capacity = 100 + softcap = 100 // should be equal to maximum cap in this case amount = 0 - ethereal_recharge_rate = 2 // forgot this was a thing LMFAO + ethereal_recharge_rate = 0.5 /obj/item/clothing/neck/mana_star name = "Volite Amulet" From 08b35f78c8f5e39e08b0139de47c32bc6dff2100 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 8 Jul 2025 02:13:09 -0400 Subject: [PATCH 04/58] progress --- maplestation.dme | 2 -- .../code/__DEFINES/magic/magic_defines.dm | 1 + .../code/modules/magic/mana/mana_pool.dm | 2 +- .../mana/sources/altars/_magic_altars.dm | 28 ++++++++++++++++++ .../{nature_stone.dm => nature_shrine.dm} | 0 .../icons/obj/magic/altars.dmi | Bin 0 -> 784 bytes 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm rename maplestation_modules/code/modules/magic/mana/sources/altars/{nature_stone.dm => nature_shrine.dm} (100%) create mode 100644 maplestation_modules/icons/obj/magic/altars.dmi diff --git a/maplestation.dme b/maplestation.dme index 67a7f8d60545..2870b091ca45 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6642,7 +6642,6 @@ #include "maplestation_modules\code\modules\vending\wardrobes.dm" #include "maplestation_modules\code\modules\wiremod\component_printer.dm" #include "maplestation_modules\code\modules\wiremod\shells.dm" -#ifdef MAPLESTATION_STORY_CONTENT #include "maplestation_modules\story_content\albert_equipment\code\albertclothing.dm" #include "maplestation_modules\story_content\albert_equipment\code\albertitem.dm" #include "maplestation_modules\story_content\alraune_miscitems\code\alrmiscitem.dm" @@ -6678,5 +6677,4 @@ #include "maplestation_modules\story_content\volkan_equipment\code\volkanpets.dm" #include "maplestation_modules\story_content\volkan_equipment\code\volkanpets_ai.dm" #include "maplestation_modules\story_content\wollys_items\code\wollysitems.dm" -#endif // MAPLESTATION_STORY_CONTENT // END_INCLUDE diff --git a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm index 8c337d777259..3836f387cd6b 100644 --- a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm +++ b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm @@ -41,6 +41,7 @@ #define BASE_LEYLINE_DONATION_RATE 30 #define MANA_BATTERY_MAX_TRANSFER_DISTANCE 3 +#define MAGIC_ALTAR_MAX_TRANSFER_DISTANCE 6 #define MAGIC_MATERIAL_NAME "Volite" #define MAGIC_UNIT_OF_MEASUREMENT "Vol" diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index 138443c4e653..f1e0f2a3e09f 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -165,7 +165,7 @@ else if (parent.mana_overloaded) parent.stop_mana_overload() - if (amount > softcap) // why was this amount < softcap + if (amount > softcap) // exponential decay // exponentially decays amount when amount surpasses softcap, with [exponential_decay_divisor] being the (inverse) decay factor // can only decay however much amount we are over softcap diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm new file mode 100644 index 000000000000..cd34d9bbfbdf --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -0,0 +1,28 @@ +// Magic altars: the general term for structures that are used as part of a process for generating mana +// this is where the base types of non-special ones and relevant documentation will be stored + +/datum/mana_pool/magic_altar + amount = 0 + +/datum/mana_pool/magic_altar/can_transfer(datum/mana_pool/target_pool) + if (QDELETED(target_pool.parent)) + return FALSE + var/obj/item/magic_altar/altar = parent + + if (altar.loc == target_pool.parent.loc) // yeah sure i copypasta from battery code, but if you manage to occupy the same tile as an altar you deserve a guranteed transfer + return TRUE + + if (get_dist(altar, target_pool.parent) > altar.max_allowed_transfer_distance) + return FALSE + return ..() + +/obj/structure/magic_altar/ + name = "magic altar basetype" + desc = "an honestly quite dull magic altar, actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" + icon = 'maplestation_modules/icons/obj/magic/altars.dmi' + icon_state = "goner" + has_initial_mana_pool = TRUE + var/max_allowed_transfer_distance = MAGIC_ALTAR_MAX_TRANSFER_DISTANCE + +/obj/structure/magic_altar/get_initial_mana_pool_type() + return /datum/mana_pool/magic_altar diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm similarity index 100% rename from maplestation_modules/code/modules/magic/mana/sources/altars/nature_stone.dm rename to maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi new file mode 100644 index 0000000000000000000000000000000000000000..b11b69be52e2aa3c45fe684ec57e4cadadc422ce GIT binary patch literal 784 zcmV+r1MmEaP)V=-0C=2JR&a84 z_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5DLp?g zwMdDJGbOXA7|1u|;!G<_%uR)`;i_^I(=(HcOG%s>pcG{c0S}vl+oD)I&_4QxH zrtxV#Xndr4v}JE%yh;4J9D=6kTA2j%4Ts|N0Y8jR;$y-Xm- zSPC38*fE+wzE>+8G+06fNzYLn1rwZN515-+# zBDmO)>vUjB$;$+6Xln_aIZeQZzLvn5O9f_Vvw-IKVd%4fzVOq~96tGJ=nnV1GmJPL z?+hcZg(m|k&J}<7^(QH=6<>HL#x|IKyeyMqY=h}nd^+CJ&he4{*Z2!iH!h72Hm5`Y O0000@5 literal 0 HcmV?d00001 From fd84b69c29aff821206c5ab29a4c0973f615e028 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Wed, 9 Jul 2025 18:23:10 -0400 Subject: [PATCH 05/58] just comitting this to checkout, wands --- maplestation_modules/code/modules/magic/wands.dm | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 maplestation_modules/code/modules/magic/wands.dm diff --git a/maplestation_modules/code/modules/magic/wands.dm b/maplestation_modules/code/modules/magic/wands.dm new file mode 100644 index 000000000000..d7805cc767bc --- /dev/null +++ b/maplestation_modules/code/modules/magic/wands.dm @@ -0,0 +1,4 @@ +// wands, basically magic wrenches, their main use is to initiate and manage player magic transfer +/obj/item/magic_wand + name = "magic wand base type" + desc = "a truly basic wand, of which all originate from. It may not be the strongest, but all wands will respect its seniority, and dread its return to the mortal coil, where the great and powerful coders shall wield it to remake the world in their image." From 8544660135d819f117e6e62a8d7d0d9f0320a40d Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 24 Jul 2025 17:50:20 -0400 Subject: [PATCH 06/58] big changes, first version of wands --- maplestation.dme | 2 + .../code/__DEFINES/magic/attunements.dm | 2 + .../code/modules/magic/mana/magic_wands.dm | 42 ++++++++++++++ .../mana/sources/altars/_magic_altars.dm | 4 +- .../magic/story_spells/night_vision.dm | 53 ++++++++++++++++++ .../code/modules/magic/wands.dm | 4 -- .../icons/obj/magic/wands.dmi | Bin 0 -> 341 bytes 7 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 maplestation_modules/code/modules/magic/mana/magic_wands.dm create mode 100644 maplestation_modules/code/modules/magic/story_spells/night_vision.dm delete mode 100644 maplestation_modules/code/modules/magic/wands.dm create mode 100644 maplestation_modules/icons/obj/magic/wands.dmi diff --git a/maplestation.dme b/maplestation.dme index 2870b091ca45..84fa83936377 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6495,6 +6495,7 @@ #include "maplestation_modules\code\modules\magic\components\has_mana.dm" #include "maplestation_modules\code\modules\magic\components\uses_mana.dm" #include "maplestation_modules\code\modules\magic\mana\living_mana.dm" +#include "maplestation_modules\code\modules\magic\mana\magic_wands.dm" #include "maplestation_modules\code\modules\magic\mana\mana.dm" #include "maplestation_modules\code\modules\magic\mana\mana_chemicals.dm" #include "maplestation_modules\code\modules\magic\mana\mana_overload.dm" @@ -6518,6 +6519,7 @@ #include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_charge.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_sense.dm" +#include "maplestation_modules\code\modules\magic\story_spells\night_vision.dm" #include "maplestation_modules\code\modules\magic\story_spells\sense_equilibrium.dm" #include "maplestation_modules\code\modules\magic\story_spells\shock_touch.dm" #include "maplestation_modules\code\modules\magic\story_spells\soothe.dm" diff --git a/maplestation_modules/code/__DEFINES/magic/attunements.dm b/maplestation_modules/code/__DEFINES/magic/attunements.dm index 40fdb40cfbd3..bdec5c37894a 100644 --- a/maplestation_modules/code/__DEFINES/magic/attunements.dm +++ b/maplestation_modules/code/__DEFINES/magic/attunements.dm @@ -23,6 +23,8 @@ #define MAGIC_ELEMENT_LIFE /datum/attunement/life #define MAGIC_ELEMENT_EARTH /datum/attunement/earth #define MAGIC_ELEMENT_ELECTRIC /datum/attunement/electric +#define MAGIC_ELEMENT_DARK /datum/attunement/dark +#define MAGIC_ELEMENT_WATER /datum/attunement/water // When other elements are used, add them here // Alignments diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm new file mode 100644 index 000000000000..5aa2f36f5a04 --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -0,0 +1,42 @@ +// wands, basically magic wrenches, their main use is to initiate and manage player magic transfer +/obj/item/magic_wand + name = "Makeshift Wand" + desc = "A 'wand' made out of scraps and reused office materials. Unless this is a part of your religion or something, you should probably ditch this for something better." + icon = 'maplestation_modules/icons/obj/magic/wands.dmi/' + icon_state = "makeshift" + +/obj/item/magic_wand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers) + var/target_mana_pool = interacting_with.mana_pool + var/user_pool = user.mana_pool + var/already_transferring = (user in mana_pool.transferring_to) + + if(!target_mana_pool) + return // no response for this failing, as else it would proc on ~70% of things in the codebase + if(!user_pool) // potentially superfluous, but a failsafe + balloon_alert(user, "you have no mana pool!") + return + if(ismob(interacting_with)) // todo: add exceptions for if we want leeching from mob pools + balloon_alert(user, "can't take from this!") + return + if (already_transferring) + balloon_alert(user, "canceled draw") + mana_pool.stop_transfer(user.mana_pool) + return + if(!user.is_holding(src)) + balloon_alert(user, "firmly grasp it!") + return + + var/static/list/options = list("Yes", "No") + var/transfer_confirmation = (tgui_alert(user, "Do you want to transfer mana from [interacting_with]?", "Transfer Mana?", options) == "Yes") + if(!transfer_confirmation || QDELETED(user) || QDELETED(src) || !user.is_holding(src)) + return + balloon_alert(user, "transferring mana....") + target_mana_pool.start_transfer(user_pool) + +/obj/item/magic_wand/attack_self(mob/user, modifiers) + . = ..() + var/already_transferring = (user in mana_pool.transferring_to) + if (already_transferring) + balloon_alert(user, "canceled draw") + mana_pool.stop_transfer(user.mana_pool) + return diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index cd34d9bbfbdf..857eae1f2da6 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -2,7 +2,7 @@ // this is where the base types of non-special ones and relevant documentation will be stored /datum/mana_pool/magic_altar - amount = 0 + amount = 200 /datum/mana_pool/magic_altar/can_transfer(datum/mana_pool/target_pool) if (QDELETED(target_pool.parent)) @@ -18,7 +18,7 @@ /obj/structure/magic_altar/ name = "magic altar basetype" - desc = "an honestly quite dull magic altar, actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" + desc = "an honestly quite dull magic altar; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" icon = 'maplestation_modules/icons/obj/magic/altars.dmi' icon_state = "goner" has_initial_mana_pool = TRUE diff --git a/maplestation_modules/code/modules/magic/story_spells/night_vision.dm b/maplestation_modules/code/modules/magic/story_spells/night_vision.dm new file mode 100644 index 000000000000..8d50e68d567e --- /dev/null +++ b/maplestation_modules/code/modules/magic/story_spells/night_vision.dm @@ -0,0 +1,53 @@ +#define EYESOFNIGHT_ATTUNEMENT_DARK 0.5 +#define EYESOFNIGHT_MANA_COST 20 + +/datum/action/cooldown/spell/eyes_of_night + name = "Eyes Of Night" + desc = "Strengthens your ability to see through darkness, making the world seem brighter." + button_icon = 'icons/mob/actions/actions_changeling.dmi' + button_icon_state = "augmented_eyesight" + + cooldown_time = 30 SECONDS // should generally match duration, as this costs mana to use + spell_requirements = NONE + var/mana_cost = EYESOFNIGHT_MANA_COST + + /// The duration of the night vision + var/vision_duration = 30 SECONDS + + +/datum/action/cooldown/spell/eyes_of_night/New(Target) + . = ..() + + var/list/datum/attunement/attunements = GLOB.default_attunements.Copy() + attunements[MAGIC_ELEMENT_DARK] += EYESOFNIGHT_ATTUNEMENT_DARK + + AddComponent(/datum/component/uses_mana/spell, \ + activate_check_failure_callback = CALLBACK(src, PROC_REF(spell_cannot_activate)), \ + get_user_callback = CALLBACK(src, PROC_REF(get_owner)), \ + mana_required = mana_cost, \ + attunements = attunements, \ + ) + +/datum/action/cooldown/spell/eyes_of_night/Remove(mob/living/remove_from) + REMOVE_TRAIT(remove_from, TRAIT_TRUE_NIGHT_VISION, MAGIC_TRAIT) + remove_from.update_sight() + return ..() + +/datum/action/cooldown/spell/eyes_of_night/is_valid_target(atom/cast_on) + return isliving(cast_on) && !HAS_TRAIT(cast_on, TRAIT_THERMAL_VISION) + +/datum/action/cooldown/spell/eyes_of_night/cast(mob/living/cast_on) + . = ..() + ADD_TRAIT(cast_on, TRAIT_TRUE_NIGHT_VISION, MAGIC_TRAIT) + cast_on.update_sight() + to_chat(cast_on, span_info("You focus your eyes intensely, the shadows around you slowly withdrawing")) + addtimer(CALLBACK(src, PROC_REF(deactivate), cast_on), vision_duration) + +/datum/action/cooldown/spell/eyes_of_night/proc/deactivate(mob/living/cast_on) + if(QDELETED(cast_on) || !HAS_TRAIT_FROM(cast_on, TRAIT_TRUE_NIGHT_VISION, MAGIC_TRAIT)) + return + + REMOVE_TRAIT(cast_on, TRAIT_TRUE_NIGHT_VISION, MAGIC_TRAIT) + cast_on.update_sight() + to_chat(cast_on, span_info("You blink a few times, your vision returning to normal.")) + diff --git a/maplestation_modules/code/modules/magic/wands.dm b/maplestation_modules/code/modules/magic/wands.dm deleted file mode 100644 index d7805cc767bc..000000000000 --- a/maplestation_modules/code/modules/magic/wands.dm +++ /dev/null @@ -1,4 +0,0 @@ -// wands, basically magic wrenches, their main use is to initiate and manage player magic transfer -/obj/item/magic_wand - name = "magic wand base type" - desc = "a truly basic wand, of which all originate from. It may not be the strongest, but all wands will respect its seniority, and dread its return to the mortal coil, where the great and powerful coders shall wield it to remake the world in their image." diff --git a/maplestation_modules/icons/obj/magic/wands.dmi b/maplestation_modules/icons/obj/magic/wands.dmi new file mode 100644 index 0000000000000000000000000000000000000000..b4ffa1ef957e426cc3e09ac9712b91a109345776 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvl>na**8>L*EbHUAxS8wQEgM&N z4{dE-85!Atz(7Z5&$8ME6*bM?NmI`4`(qDO&sY-V7tG-B>_!@plUo%MQR0$XoLrPy zP?DLS$G}iACpfI2sPy}n;DV1|pJ;jOYMncCK6pc@!A0W-k95xaXr5#!>gnBKVH{+9 z+1N{A&Z9|3CWR;jYnmHcZ?#Z1UhC4?ZLGR^g@i`hiK8>arp%blm8h+~6biiD#*tShv_N(vXQ jdf*g%;J}71Mtueb9X(OE&JI@zpp6Wku6{1-oD!M<{WE%_ literal 0 HcmV?d00001 From 5d67a50b194d498acb3477e95fa569b143177f06 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 24 Jul 2025 17:50:35 -0400 Subject: [PATCH 07/58] dme --- maplestation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/maplestation.dme b/maplestation.dme index 84fa83936377..3ae310d766ce 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6502,6 +6502,7 @@ #include "maplestation_modules\code\modules\magic\mana\mana_pool.dm" #include "maplestation_modules\code\modules\magic\mana\attunements\attunement.dm" #include "maplestation_modules\code\modules\magic\mana\sources\mana_batteries.dm" +#include "maplestation_modules\code\modules\magic\mana\sources\altars\_magic_altars.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leylines.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_attunements.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_intensities.dm" From de54ad1652064d88bbba5415243536abc2973d19 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 24 Jul 2025 17:53:21 -0400 Subject: [PATCH 08/58] temporarily disables a feature so it can compiles --- maplestation_modules/code/modules/magic/mana/magic_wands.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index 5aa2f36f5a04..3d266d33230c 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -33,10 +33,10 @@ balloon_alert(user, "transferring mana....") target_mana_pool.start_transfer(user_pool) -/obj/item/magic_wand/attack_self(mob/user, modifiers) +/* /obj/item/magic_wand/attack_self(mob/user, modifiers) . = ..() var/already_transferring = (user in mana_pool.transferring_to) if (already_transferring) balloon_alert(user, "canceled draw") mana_pool.stop_transfer(user.mana_pool) - return + return */ From b4db2c28484a0a5b3083ffd687507b4c11745e35 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 24 Jul 2025 19:24:34 -0400 Subject: [PATCH 09/58] fixes compilation errors --- .../code/modules/magic/mana/magic_wands.dm | 7 ++++--- .../modules/magic/mana/sources/altars/_magic_altars.dm | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index 3d266d33230c..46e8f2b939d4 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -2,12 +2,13 @@ /obj/item/magic_wand name = "Makeshift Wand" desc = "A 'wand' made out of scraps and reused office materials. Unless this is a part of your religion or something, you should probably ditch this for something better." - icon = 'maplestation_modules/icons/obj/magic/wands.dmi/' + icon = 'maplestation_modules/icons/obj/magic/wands.dmi' icon_state = "makeshift" + w_class = WEIGHT_CLASS_NORMAL // meant to be big and hard to store, additional reason to not use this /obj/item/magic_wand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers) - var/target_mana_pool = interacting_with.mana_pool - var/user_pool = user.mana_pool + var/datum/mana_pool/target_mana_pool = interacting_with.mana_pool + var/datum/mana_pool/user_pool = user.mana_pool var/already_transferring = (user in mana_pool.transferring_to) if(!target_mana_pool) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index 857eae1f2da6..acb9b344b070 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -7,7 +7,7 @@ /datum/mana_pool/magic_altar/can_transfer(datum/mana_pool/target_pool) if (QDELETED(target_pool.parent)) return FALSE - var/obj/item/magic_altar/altar = parent + var/obj/structure/magic_altar/altar = parent if (altar.loc == target_pool.parent.loc) // yeah sure i copypasta from battery code, but if you manage to occupy the same tile as an altar you deserve a guranteed transfer return TRUE From c19f18414a8de6c9c3f1f62d37a06e98f0a5b606 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 26 Jul 2025 02:23:36 -0400 Subject: [PATCH 10/58] wand work good --- .../code/modules/magic/mana/magic_wands.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index 46e8f2b939d4..e24a6e1424c8 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -9,7 +9,7 @@ /obj/item/magic_wand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers) var/datum/mana_pool/target_mana_pool = interacting_with.mana_pool var/datum/mana_pool/user_pool = user.mana_pool - var/already_transferring = (user in mana_pool.transferring_to) + var/already_transferring = (user in target_mana_pool.transferring_to) if(!target_mana_pool) return // no response for this failing, as else it would proc on ~70% of things in the codebase @@ -19,13 +19,14 @@ if(ismob(interacting_with)) // todo: add exceptions for if we want leeching from mob pools balloon_alert(user, "can't take from this!") return + if (already_transferring) balloon_alert(user, "canceled draw") - mana_pool.stop_transfer(user.mana_pool) + target_mana_pool.stop_transfer(user_pool) return - if(!user.is_holding(src)) +/* if(!user.is_holding(src)) balloon_alert(user, "firmly grasp it!") - return + return */ var/static/list/options = list("Yes", "No") var/transfer_confirmation = (tgui_alert(user, "Do you want to transfer mana from [interacting_with]?", "Transfer Mana?", options) == "Yes") From 99c4751d632a9f8c5de015e203e1e61dcb377e6d Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 26 Jul 2025 16:51:13 -0400 Subject: [PATCH 11/58] adds the newer spells to the cantrip tab --- .../spellbook/items/spellbook_cantrips.dm | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm index 611a3f08b37e..2c3742fefb75 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm @@ -222,3 +222,50 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT category = SPELLBOOK_CATEGORY_MISC our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weirda + +/datum/spellbook_item/spell/meditate + name = "Magic Meditation" + description = "Use mental focus to draw mana within yourself" + lore = "The most basic method of regenerating mana on your own. \ + Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ + Do note that this will take a while between casts, and you should still find other methods of regeneration." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/meditate + +/datum/spellbook_item/spell/mana_sense + name = "Mana Sense" + description = "Sense other mana pools present" + lore = "Using your magical attunement (or other aptitudes) \ + you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ + Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense + +/datum/spellbook_item/spell/sending + name = "Sending" + description = "Its Telepathy, but with magic." + lore = "Using your magical attunement (or other aptitudes) \ + you can send a message to another creature within a short radius. " + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/list_target/telepathy/mana + +/datum/spellbook_item/spell/sense_equilibrium + name = "Sense Equilibrium" + description = "Divert pathways in a person's brain from one area to another, enhancing one at the cost of the other." + lore = "Shape the power of the mind to your will." // I ain't writing all that. + + category = SPELLBOOK_CATEGORY_CANTRIPS + has_params = TRUE + + our_action_typepath = /datum/action/cooldown/spell/list_target/sense_equilibrium + +// Customization to allow greater sense equilibrium +/datum/spellbook_item/spell/sense_equilibrium/generate_customization_params() + . = list() + .["greater"] = new /datum/spellbook_customization_entry/boolean("greater", "Greater, stronger, shorter lasting version", "A more expensive and shorter lasting form of Sense Equilibrium which allows the user to pinpoint the exact effect they wish the spell to have.") From 97b6d8b240d7f1fd1304c40324b88c1689b70f10 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 26 Jul 2025 17:33:15 -0400 Subject: [PATCH 12/58] work trying to fix the null index error --- maplestation.dme | 1 + .../magic/spellbook/spellbook_categories.dm | 5 +-- .../spellbook/items/spellbook_cantrips.dm | 34 ------------------- .../spellbook/items/spellbook_manipulation.dm | 34 +++++++++++++++++++ .../spellbook/spellbook_manager.dm | 1 + 5 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm diff --git a/maplestation.dme b/maplestation.dme index 3ae310d766ce..bf308a727008 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6393,6 +6393,7 @@ #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_manager.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_cantrips.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_entry.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_manipulation.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_spell_entry.dm" #include "maplestation_modules\code\modules\client\verbs\looc.dm" #include "maplestation_modules\code\modules\clothing\digi_clothing.dm" diff --git a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm index ce2e450dfffc..9bd260564f05 100644 --- a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm +++ b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm @@ -1,4 +1,4 @@ -#define SPELLBOOK_CATEGORY_THERMOKINESIS "Thermokinesis" +/* #define SPELLBOOK_CATEGORY_THERMOKINESIS "Thermokinesis" #define SPELLBOOK_CATEGORY_CRYOKINESIS "Cryokinesis" #define SPELLBOOK_CATEGORY_HYDROKINESIS "Hydrokinesis" #define SPELLBOOK_CATEGORY_THAUMATURGY "Thaumaturgy" @@ -7,7 +7,8 @@ #define SPELLBOOK_CATEGORY_GEOMANCY "Geomancy" #define SPELLBOOK_CATEGORY_ELECTROKINESIS "Electrokinesis" #define SPELLBOOK_CATEGORY_LIFE_MAGIC "Life Magic" -#define SPELLBOOK_CATEGORY_MISC "Misc. Spells" +#define SPELLBOOK_CATEGORY_MISC "Misc. Spells" */ // todo: clear out the above #define SPELLBOOK_CATEGORY_CANTRIPS "Cantrips" +#define SPELLBOOK_CATEGORY_MANIPULATION "Manipulation" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm index 2c3742fefb75..a05ca2a8a7da 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm @@ -211,40 +211,6 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT our_action_typepath = /datum/action/cooldown/spell/pointed/soft_and_wet - -/* /datum/spellbook_item/spell/leyline_charge - name = "Leyline Charge" - description = "Draw mana straight from the leylines themselves." - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to regain mana from the leylines themselves. \ - Do not that this is a finnicky way of regaining mana, and you risk overloading if done improperly." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weirda - -/datum/spellbook_item/spell/meditate - name = "Magic Meditation" - description = "Use mental focus to draw mana within yourself" - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ - Do note that this will take a while between casts, and you should still find other methods of regeneration." - - category = SPELLBOOK_CATEGORY_CANTRIPS - - our_action_typepath = /datum/action/cooldown/spell/meditate - -/datum/spellbook_item/spell/mana_sense - name = "Mana Sense" - description = "Sense other mana pools present" - lore = "Using your magical attunement (or other aptitudes) \ - you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ - Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." - - category = SPELLBOOK_CATEGORY_CANTRIPS - - our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense - /datum/spellbook_item/spell/sending name = "Sending" description = "Its Telepathy, but with magic." diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm new file mode 100644 index 000000000000..005746d5c389 --- /dev/null +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm @@ -0,0 +1,34 @@ +GLOBAL_LIST_INIT(spellbook_manipulation_items, generate_spellbook_items(SPELLBOOK_CATEGORY_MANIPULATION)) + +/* /datum/spellbook_item/spell/leyline_charge + name = "Leyline Charge" + description = "Draw mana straight from the leylines themselves." + lore = "The most basic method of regenerating mana on your own. \ + Casting this invocation- while focusing- will allow you to regain mana from the leylines themselves. \ + Do not that this is a finnicky way of regaining mana, and you risk overloading if done improperly." + + category = SPELLBOOK_CATEGORY_MISC + + our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weirda + +/datum/spellbook_item/spell/meditate + name = "Magic Meditation" + description = "Use mental focus to draw mana within yourself" + lore = "The most basic method of regenerating mana on your own. \ + Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ + Do note that this will take a while between casts, and you should still find other methods of regeneration." + + category = SPELLBOOK_CATEGORY_MANIPULATION + + our_action_typepath = /datum/action/cooldown/spell/meditate + +/datum/spellbook_item/spell/mana_sense + name = "Mana Sense" + description = "Sense other mana pools present" + lore = "Using your magical attunement (or other aptitudes) \ + you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ + Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." + + category = SPELLBOOK_CATEGORY_MANIPULATION + + our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm index 1a9378357a32..337c5562c352 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm @@ -142,6 +142,7 @@ var/list/spellbook_tabs = list() spellbook_tabs += list(list("name" = "Cantrips", "title" = "Simple spells that require little preparation or components to cast", "contents" = list_to_data(GLOB.spellbook_cantrip_items))) + spellbook_tabs += list(list("name" = "Manipulation", "title" = "Capabilities that typically involve the manipulation of or other use of mana", "contents" = list_to_data(GLOB.spellbook_manipulation_items))) /* spellbook_tabs += list(list("name" = "Aeromancy", "title" = "Items related to manipulation of air and motion", "contents" = list_to_data(GLOB.spellbook_aeromancy_items))) spellbook_tabs += list(list("name" = "Cryokinesis", "title" = "Items related to manipulation of ice", "contents" = list_to_data(GLOB.spellbook_cryokinesis_items))) From 668647d2dad214a1204ed4b40e84094a1c062ec4 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 27 Jul 2025 19:37:37 -0400 Subject: [PATCH 13/58] cleans up stuff from the old tabs, fixes bad index issue --- maplestation.dme | 4 +- .../magic/spellbook/spellbook_categories.dm | 12 --- ...cantrips.dm => spellbook_item_cantrips.dm} | 0 .../items/spellbook_item_cryokinesis.dm | 37 ---------- .../items/spellbook_item_electrokinesis.dm | 16 ---- .../items/spellbook_item_geomancy.dm | 13 ---- .../spellbook/items/spellbook_item_healing.dm | 29 -------- .../items/spellbook_item_hydrokinesis.dm | 13 ---- .../items/spellbook_item_lumenomancy.dm | 32 -------- ...tion.dm => spellbook_item_manipulation.dm} | 0 .../spellbook/items/spellbook_item_misc.dm | 73 ------------------- .../items/spellbook_item_thaumaturgy.dm | 14 ---- .../items/spellbook_item_thermokinesis.dm | 27 ------- .../spellbook/spellbook_manager.dm | 11 --- 14 files changed, 2 insertions(+), 279 deletions(-) rename maplestation_modules/code/modules/client/preferences/spellbook/items/{spellbook_cantrips.dm => spellbook_item_cantrips.dm} (100%) delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cryokinesis.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_electrokinesis.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_geomancy.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_healing.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_hydrokinesis.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_lumenomancy.dm rename maplestation_modules/code/modules/client/preferences/spellbook/items/{spellbook_manipulation.dm => spellbook_item_manipulation.dm} (100%) delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_misc.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thaumaturgy.dm delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thermokinesis.dm diff --git a/maplestation.dme b/maplestation.dme index bf308a727008..0a06e934dc2a 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6391,9 +6391,9 @@ #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_helpers.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_item_customization_menu.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_manager.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_cantrips.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_entry.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_manipulation.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_cantrips.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_manipulation.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_spell_entry.dm" #include "maplestation_modules\code\modules\client\verbs\looc.dm" #include "maplestation_modules\code\modules\clothing\digi_clothing.dm" diff --git a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm index 9bd260564f05..27817d457a74 100644 --- a/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm +++ b/maplestation_modules/code/__DEFINES/magic/spellbook/spellbook_categories.dm @@ -1,14 +1,2 @@ -/* #define SPELLBOOK_CATEGORY_THERMOKINESIS "Thermokinesis" -#define SPELLBOOK_CATEGORY_CRYOKINESIS "Cryokinesis" -#define SPELLBOOK_CATEGORY_HYDROKINESIS "Hydrokinesis" -#define SPELLBOOK_CATEGORY_THAUMATURGY "Thaumaturgy" -#define SPELLBOOK_CATEGORY_LUMENOMANCY "Lumenomancy" -#define SPELLBOOK_CATEGORY_AEROMANCY "Aeromancy" -#define SPELLBOOK_CATEGORY_GEOMANCY "Geomancy" -#define SPELLBOOK_CATEGORY_ELECTROKINESIS "Electrokinesis" -#define SPELLBOOK_CATEGORY_LIFE_MAGIC "Life Magic" -#define SPELLBOOK_CATEGORY_MISC "Misc. Spells" */ - -// todo: clear out the above #define SPELLBOOK_CATEGORY_CANTRIPS "Cantrips" #define SPELLBOOK_CATEGORY_MANIPULATION "Manipulation" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm similarity index 100% rename from maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_cantrips.dm rename to maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cryokinesis.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cryokinesis.dm deleted file mode 100644 index 65206ed42242..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cryokinesis.dm +++ /dev/null @@ -1,37 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_cryokinesis_items, generate_spellbook_items(SPELLBOOK_CATEGORY_CRYOKINESIS)) - -/datum/spellbook_item/spell/ice_blast - name = "Ice Blast" - description = "An incantation to summon a condensed energy proejctile made out of ice. On contact with anything, it'll cover the nearby surfaces with a thin layer of ice." - lore = "The favored tool of Frost Mages, Clowns, and Frost Clowns, Ice Blasts are quick and easy ways of inconveniencing an area for slip and slides alike." - - category = SPELLBOOK_CATEGORY_CRYOKINESIS - - our_action_typepath = /datum/action/cooldown/spell/pointed/projectile/ice_blast - -/datum/spellbook_item/spell/ice_knife - name = "Ice Knife" - description = "Conjures an ice knife at will in your hands." - lore = "A spell not commonly practiced by followers of Cryokinesis for the fact that the knife's durability is much less desirable than a real one, some still sought to learn it for the sake of self defense. \ - Even then, the knife does not hold well on it's own and will eventually dissapear as to preserve mana." - - category = SPELLBOOK_CATEGORY_CRYOKINESIS - has_params = TRUE - - our_action_typepath = /datum/action/cooldown/spell/conjure_item/ice_knife - -/datum/spellbook_item/spell/ice_knife/generate_customization_params() - . = list() - .["ice_blade"] = new /datum/spellbook_customization_entry/boolean("ice_blade", "Ice Armblade Variant", "Construct a blade around your arm, in exchange of harming you in the process.") - - -/datum/spellbook_item/spell/freeze_person - name = "Freeze Person" - description = "A well known and effective spell that encases your victim in a block of enchanted ice." - lore = "Iconic and infamous, Freeze Person has been used to great effect to solidify opponents, victims, and other targets of mages for centuries.\ - Though it is quite useful to stop someone in their tracks, the ice around them is resistant enough to protect them from incoming attacks.\ - Just be careful you know exactly what this spell is before casting it." - - category = SPELLBOOK_CATEGORY_CRYOKINESIS - - our_action_typepath = /datum/action/cooldown/spell/pointed/freeze_person diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_electrokinesis.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_electrokinesis.dm deleted file mode 100644 index 0c1a4476d3da..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_electrokinesis.dm +++ /dev/null @@ -1,16 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_electrokinesis_items, generate_spellbook_items(SPELLBOOK_CATEGORY_ELECTROKINESIS)) - -/datum/spellbook_item/spell/shock_touch - name = "Shocking Grasp" - description = "Empower your hand to deliver a shock to your target. \ - While the zap is not powerful enough to stun or kill, it will cause them to drop their held items - or restart a stopped heart." - lore = "A spell which has gained notoriety for its utility in the medical field. \ - Many wizards have found use in it, to jolt a patient out of a coma, or to restart a heart which has stopped beating. \ - However, it is also a favorite of clowns, who use it as a less-obvious joybuzzer.\n\n\ - Oddly, some Geneticists have found latent genes in their test subjects which allow them to use a similar ability, \ - without the need for learning any magic or using any mana. It has yet to be determined if humanoidkind has an innate, untapped ability \ - to manipulate electricity that this spell and the genetic ability are tapping into, or if it is simply a coincidence." - - category = SPELLBOOK_CATEGORY_ELECTROKINESIS - - our_action_typepath = /datum/action/cooldown/spell/touch/shock/magical diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_geomancy.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_geomancy.dm deleted file mode 100644 index b9478acd43b3..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_geomancy.dm +++ /dev/null @@ -1,13 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_geomancy_items, generate_spellbook_items(SPELLBOOK_CATEGORY_GEOMANCY)) - -/datum/spellbook_item/spell/acid_touch - name = "Acid Touch" - description = "Empowers your finger with a sticky acid, melting anything (or anyone) you touch." - lore = "A very volatile spell which has resulted in many a wizard accidentily melting off their own hands. \ - The acid generated is comparable to that of sulfuric acid.\nThis has led to the spell gaining wide use \ - in the criminal underworld, as it is a very effective way to make entrances or exits, dispose of evidence, \ - or create a distraction." - - category = SPELLBOOK_CATEGORY_GEOMANCY - - our_action_typepath = /datum/action/cooldown/spell/touch/acid_touch diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_healing.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_healing.dm deleted file mode 100644 index 37c556d39118..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_healing.dm +++ /dev/null @@ -1,29 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_healing_items, generate_spellbook_items(SPELLBOOK_CATEGORY_LIFE_MAGIC)) - -/datum/spellbook_item/spell/healing_touch - name = "Healing Touch" - description = "Lay your hands upon a target to heal their wounds." - lore = "Often called for the action taken while invoking, \"Lay on Hands\", this spell is a staple of any healer's arsenal. \ - Healing Touch is often used by chaplains and priests to aid the ailing and wounded they encounter in their duties. \ - However, that's not to say that its use is exclusively for the holy, as some medical practitioners \ - (especially those who find themselves on the frontier, where supplies are scarce) \ - have been known to utilize it occasionally to expedite their work - \ - though many still find physical tools or chemicals to be more reliable, and thus, it's use is not as common as one might think." - - category = SPELLBOOK_CATEGORY_LIFE_MAGIC - - our_action_typepath = /datum/action/cooldown/spell/touch/healing_touch - -/datum/spellbook_item/spell/soothe - name = "Soothe" - description = "Attempt to soothe a target, stopping them from feeling rage, fear, doubt, or similar emotions for a short time. \ - This effect can be resisted by sentient targets, but also works on more simple-minded creatures." - lore = "A spell that is often used by by clergical figures, psychologists, or nurses to calm down those who cannot be reasoned with \ - due to its ability to provide tranquility to those in a state of panic or fear. \n\ - Likewise, those who work with animals may use it to pacify a rampaging beast or settle a frightened pet.\n\ - However, its ability to be resisted by sentient creatures who are in extreme mental duress, especially anger, \ - means it is not always reliable - and thus - conventional methods are often preferred." - - category = SPELLBOOK_CATEGORY_LIFE_MAGIC - - our_action_typepath = /datum/action/cooldown/spell/pointed/soothe_target diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_hydrokinesis.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_hydrokinesis.dm deleted file mode 100644 index 8eaaec1107dd..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_hydrokinesis.dm +++ /dev/null @@ -1,13 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_hydrokinesis_items, generate_spellbook_items(SPELLBOOK_CATEGORY_HYDROKINESIS)) - -/datum/spellbook_item/spell/soft_and_wet - name = "Water Control" - description = "Wet a dry spot, or dry a wet spot, from a distance. \ - Wetting a requires a water source - you can draw upon condensation in your surroundings, or supply your own." - lore = "Quite a mundane spell, Water Control does just that - control water, in whatever form it may be in. Except ice. \ - It allows you to break apart water molecules into vapor or condense them into liquid. \ - Hydromancers are often seen using this spell to put out fires, much to the chagrin of thermomancers." - - category = SPELLBOOK_CATEGORY_HYDROKINESIS - - our_action_typepath = /datum/action/cooldown/spell/pointed/soft_and_wet diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_lumenomancy.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_lumenomancy.dm deleted file mode 100644 index 3ce76b2f51c1..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_lumenomancy.dm +++ /dev/null @@ -1,32 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_lumenomancy_items, generate_spellbook_items(SPELLBOOK_CATEGORY_LUMENOMANCY)) - -/datum/spellbook_item/spell/conjure_item/flare - name = "Flare" - description = "Conjure lumens into a glob to be held or thrown to light an area." - lore = "A simple application of lumenomancy, although quite complex enough for those new to magic to have the resulting globule sustain itself for so long. \n\ - An extremely common spell, used to gauge a child's power if they are able to even emit a moment of light, it is well known among the wider magic community.\n\ - Effort is taken to understand lumens and conjuring it out of mana. Those that study might prefer to focus on another school of magic, causing them to skip proper flare casting.\n\ - A relatively safe spell that dissipates by itself under normal circumstances, the nebulous construct leaves no residue so clean up isn't needed.\n\ - Considered to be a helpful spell, its short lived life is mostly used to help locate more permanent lighting options.\n\ - Those interested in the lumenomancy school/predisposition use this spell to further their understanding of luminosity and their ability to warp its directions." - - category = SPELLBOOK_CATEGORY_LUMENOMANCY - has_params = TRUE - - our_action_typepath = /datum/action/cooldown/spell/conjure_item/flare -// Customization to allow lesser flare -/datum/spellbook_item/spell/conjure_item/flare/generate_customization_params() - . = list() - .["lesser"] = new /datum/spellbook_customization_entry/boolean("lesser", "Lesser, weaker, somewhat cheaper version", "A cheap less lasting flare that fizzles out faster than normally, along with a considerable cooldown between casts, for those just learning magic or unable to grasp the full concept of luminosity.") - -/datum/spellbook_item/spell/illusion - name = "Illusion" - description = "Summon an illusionary clone of yourself at the target location. Looks identical to you, \ - but will not hold up to physical scrutiny. Has a long range, but lasts for only a short time, and is less effective in darker areas." - lore = "Sometimes known as \"Mirror Image\" by more advanced pracitioners, Illusion is a well practiced spell which bends the light \ - in such a way to create an almost perfect copy of the caster. Of course, being effectively an advanced trick of the light, \ - the illusion is not capable of much besides being used to confuse and distract or otherwise look pretty." - - category = SPELLBOOK_CATEGORY_LUMENOMANCY - - our_action_typepath = /datum/action/cooldown/spell/pointed/illusion diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm similarity index 100% rename from maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_manipulation.dm rename to maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_misc.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_misc.dm deleted file mode 100644 index 0cfc6856f08b..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_misc.dm +++ /dev/null @@ -1,73 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_misc_items, generate_spellbook_items(SPELLBOOK_CATEGORY_MISC)) - -/datum/spellbook_item/spell/mage_hand - name = "Mage Hand" - description = "Magically manipulate an item from a distance." - lore = "The favorite of lazy magicians and tricksters alike, \ - Mage Hand is a simple spell that allows the caster to manipulate an item from a distance. \ - The spell is often used to retrieve items that are out of reach, play pranks on unsuspecting victims, \ - press some buttons on a distant keyboard, or to simply avoid having to get up from a comfortable chair.\n\ - Due to its simplicity, the spell is often taught to the young as a first spell - and due to this commonality, \ - it is very easily recognized by most." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/apply_mutations/mage_hand - -/* /datum/spellbook_item/spell/leyline_charge - name = "Leyline Charge" - description = "Draw mana straight from the leylines themselves." - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to regain mana from the leylines themselves. \ - Do not that this is a finnicky way of regaining mana, and you risk overloading if done improperly." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weird - -/datum/spellbook_item/spell/meditate - name = "Magic Meditation" - description = "Use mental focus to draw mana within yourself" - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ - Do note that this will take a while between casts, and you should still find other methods of regeneration." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/meditate - -/datum/spellbook_item/spell/mana_sense - name = "Mana Sense" - description = "Sense other mana pools present" - lore = "Using your magical attunement (or other aptitudes) \ - you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ - Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense - -/datum/spellbook_item/spell/sending - name = "Sending" - description = "Its Telepathy, but with magic." - lore = "Using your magical attunement (or other aptitudes) \ - you can send a message to another creature within a short radius. " - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/list_target/telepathy/mana - -/datum/spellbook_item/spell/sense_equilibrium - name = "Sense Equilibrium" - description = "Divert pathways in a person's brain from one area to another, enhancing one at the cost of the other." - lore = "Shape the power of the mind to your will." // I ain't writing all that. - - category = SPELLBOOK_CATEGORY_MISC - has_params = TRUE - - our_action_typepath = /datum/action/cooldown/spell/list_target/sense_equilibrium - -// Customization to allow greater sense equilibrium -/datum/spellbook_item/spell/sense_equilibrium/generate_customization_params() - . = list() - .["greater"] = new /datum/spellbook_customization_entry/boolean("greater", "Greater, stronger, shorter lasting version", "A more expensive and shorter lasting form of Sense Equilibrium which allows the user to pinpoint the exact effect they wish the spell to have.") diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thaumaturgy.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thaumaturgy.dm deleted file mode 100644 index dfdef3ce1452..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thaumaturgy.dm +++ /dev/null @@ -1,14 +0,0 @@ -/*GLOBAL_LIST_INIT(spellbook_thaumaturgy_items, generate_spellbook_items(SPELLBOOK_CATEGORY_THAUMATURGY)) - -/datum/spellbook_item/spell/thaumatergic_sense - name = "Thaumatergic Sense" - description = "The ability to sense the amount of mana within mana pools." - lore = "" - - category = SPELLBOOK_CATEGORY_THAUMATURGY - - our_action_typepath = /datum/action/cooldown/spell/thaumatergic_sense - -/datum/spellbook_item/spell/thaumatergic_sense/apply_params(/datum/action/cooldown/spell/thaumatergic_sense/our_spell, ...) - -*/ diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thermokinesis.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thermokinesis.dm deleted file mode 100644 index 4b64aa2f25cb..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_thermokinesis.dm +++ /dev/null @@ -1,27 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_thermokinesis_items, generate_spellbook_items(SPELLBOOK_CATEGORY_THERMOKINESIS)) - -/datum/spellbook_item/spell/convect - name = "Convect" - description = "Manipulate the temperature of anything you can touch." - lore = "Often considered the precursor to all thermal magic, convect is one of the most important fundumentals of thermokinesis. \ - An extremely common spell, at least for thermomancers, it is well known among the wider magic community and rather typical.\n\ - Latently available to some, with that latency being why it's so common. Those that learn through the latency typically require training to consistantly control it.\n\ - This latency, linked with it's relative simplicity of casting, causes stories of previous thaumic blanks suddenly bursting into flames/\ - freezing themselves (often due to intense emotion, though triggers can be diverse) to be common among the magic community.\n\ - While exceptions exist, most users can only manipulate temperature in the direction of their thermokinetic school/predisposition (fire/ice or both)." - - category = SPELLBOOK_CATEGORY_THERMOKINESIS - - our_action_typepath = /datum/action/cooldown/spell/pointed/convect - -/datum/spellbook_item/spell/finger_flame - name = "Finger Flame" - description = "With a snap, conjures a small flame at the tip of your fingers." - lore = "More of a party trick than a real spell, Finger Flame is known far and wide as the showiest trick in a thermomancer's book. \ - While not particularly useful, it's a fantastic way to get attention, intimidate someone, demonstrate your powers, or light a cigarette.\n\ - Its low potency makes Finger Flame hardly expensive or tiresome to cast and maintain, \ - making it a good way to practice your control over fire (or rather, to practice avoiding burning yourself)." - - category = SPELLBOOK_CATEGORY_THERMOKINESIS - - our_action_typepath = /datum/action/cooldown/spell/touch/finger_flame/mana diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm index 337c5562c352..168be6490355 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/spellbook_manager.dm @@ -143,17 +143,6 @@ var/list/spellbook_tabs = list() spellbook_tabs += list(list("name" = "Cantrips", "title" = "Simple spells that require little preparation or components to cast", "contents" = list_to_data(GLOB.spellbook_cantrip_items))) spellbook_tabs += list(list("name" = "Manipulation", "title" = "Capabilities that typically involve the manipulation of or other use of mana", "contents" = list_to_data(GLOB.spellbook_manipulation_items))) - /* - spellbook_tabs += list(list("name" = "Aeromancy", "title" = "Items related to manipulation of air and motion", "contents" = list_to_data(GLOB.spellbook_aeromancy_items))) - spellbook_tabs += list(list("name" = "Cryokinesis", "title" = "Items related to manipulation of ice", "contents" = list_to_data(GLOB.spellbook_cryokinesis_items))) - spellbook_tabs += list(list("name" = "Thermokinesis", "title" = "Items related to manipulation of temperature", "contents" = list_to_data(GLOB.spellbook_thermokinesis_items))) - spellbook_tabs += list(list("name" = "Hydrokinesis", "title" = "Items related to manipulation of water", "contents" = list_to_data(GLOB.spellbook_hydrokinesis_items))) - spellbook_tabs += list(list("name" = "Lumenomancy", "title" = "Items related to manipulation of light", "contents" = list_to_data(GLOB.spellbook_lumenomancy_items))) - spellbook_tabs += list(list("name" = "Geomancy", "title" = "Items related to manipulation of earth", "contents" = list_to_data(GLOB.spellbook_geomancy_items))) - spellbook_tabs += list(list("name" = "Electrokinesis", "title" = "Items related to manipulation of electricity", "contents" = list_to_data(GLOB.spellbook_electrokinesis_items))) - spellbook_tabs += list(list("name" = "Life Magic", "title" = "Items related to Life and Healing magic", "contents" = list_to_data(GLOB.spellbook_healing_items))) - spellbook_tabs += list(list("name" = "Misc. Spells", "title" = "Other miscellaneous spells, not associated with any attunements", "contents" = list_to_data(GLOB.spellbook_misc_items))) - */ data["spellbook_tabs"] = spellbook_tabs From eec25521f72b4eb95389cb9b5ab0f65833885ef4 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 28 Jul 2025 16:48:46 -0400 Subject: [PATCH 14/58] fixes transferrence. Lol. --- maplestation_modules/code/__DEFINES/magic/magic_defines.dm | 2 +- maplestation_modules/code/modules/magic/mana/mana_pool.dm | 1 + .../code/modules/magic/mana/sources/altars/_magic_altars.dm | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm index 3836f387cd6b..184b74903897 100644 --- a/maplestation_modules/code/__DEFINES/magic/magic_defines.dm +++ b/maplestation_modules/code/__DEFINES/magic/magic_defines.dm @@ -36,7 +36,7 @@ #define MANA_CRYSTAL_BASE_DECAY_DIVISOR (BASE_MANA_EXPONENTIAL_DIVISOR * 5) // in vols per second -#define BASE_MANA_DONATION_RATE (BASE_MANA_CAPACITY * 0.5) +#define BASE_MANA_DONATION_RATE (BASE_MANA_CAPACITY * 0.1) #define BASE_MANA_CRYSTAL_DONATION_RATE (BASE_MANA_DONATION_RATE * 0.1) #define BASE_LEYLINE_DONATION_RATE 30 diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index f1e0f2a3e09f..5ca920d803db 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -230,6 +230,7 @@ if (target_pool in transferring_to) return MANA_POOL_ALREADY_TRANSFERRING + transferring_to += target_pool target_pool.incoming_transfer_start(src) RegisterSignal(target_pool, COMSIG_QDELETING, PROC_REF(stop_transfer)) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index acb9b344b070..88b8cf342e39 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -2,7 +2,8 @@ // this is where the base types of non-special ones and relevant documentation will be stored /datum/mana_pool/magic_altar - amount = 200 + amount = 500 + max_donation_rate_per_second = 2 // pretty slow, but a solid source of mana /datum/mana_pool/magic_altar/can_transfer(datum/mana_pool/target_pool) if (QDELETED(target_pool.parent)) From d4507448958ab984d66a1fe2253b20d839c71452 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 4 Aug 2025 01:16:02 -0400 Subject: [PATCH 15/58] mild changes, first parts of the nature shrine, adds eyes of night to the spellbook list and changes its file name --- maplestation.dme | 2 +- .../items/spellbook_item_cantrips.dm | 9 ++++++ .../mana/sources/altars/_magic_altars.dm | 2 ++ .../mana/sources/altars/nature_shrine.dm | 32 +++++++++++++++++++ .../{night_vision.dm => eyes_of_night.dm} | 0 5 files changed, 44 insertions(+), 1 deletion(-) rename maplestation_modules/code/modules/magic/story_spells/{night_vision.dm => eyes_of_night.dm} (100%) diff --git a/maplestation.dme b/maplestation.dme index 0a06e934dc2a..538bc2dc9806 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6511,6 +6511,7 @@ #include "maplestation_modules\code\modules\magic\story_spells\acid_touch.dm" #include "maplestation_modules\code\modules\magic\story_spells\airhike.dm" #include "maplestation_modules\code\modules\magic\story_spells\convect.dm" +#include "maplestation_modules\code\modules\magic\story_spells\eyes_of_night.dm" #include "maplestation_modules\code\modules\magic\story_spells\finger_flame.dm" #include "maplestation_modules\code\modules\magic\story_spells\flare.dm" #include "maplestation_modules\code\modules\magic\story_spells\freeze_person.dm" @@ -6521,7 +6522,6 @@ #include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_charge.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_sense.dm" -#include "maplestation_modules\code\modules\magic\story_spells\night_vision.dm" #include "maplestation_modules\code\modules\magic\story_spells\sense_equilibrium.dm" #include "maplestation_modules\code\modules\magic\story_spells\shock_touch.dm" #include "maplestation_modules\code\modules\magic\story_spells\soothe.dm" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index a05ca2a8a7da..b83c35fe7411 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -235,3 +235,12 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT /datum/spellbook_item/spell/sense_equilibrium/generate_customization_params() . = list() .["greater"] = new /datum/spellbook_customization_entry/boolean("greater", "Greater, stronger, shorter lasting version", "A more expensive and shorter lasting form of Sense Equilibrium which allows the user to pinpoint the exact effect they wish the spell to have.") + +/datum/spellbook_item/spell/eyes_of_night + name "Eyes of Night" + description = "Attune your eyes to see better in the dark." + lore = "A staple of dark mages, and one of the most commonly used dark magic spells, this spell allows one to see within the dark without illuminating the surronding area." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/eyes_of_night diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index 88b8cf342e39..1364359e182f 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -2,6 +2,8 @@ // this is where the base types of non-special ones and relevant documentation will be stored /datum/mana_pool/magic_altar + maximum_mana_capacity = 500 + softcap = 500 amount = 500 max_donation_rate_per_second = 2 // pretty slow, but a solid source of mana diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index 67eced4a54ed..f9d0b42e3a0e 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -3,12 +3,14 @@ #define NATURE_SHRINE_MANA_LOW list( /obj/item/food/grown/poppy, + /obj/item/food/grown/sunflower, ) #define NATURE_SHRINE_MANA_LOW_COUNT = 10 #define NATURE_SHRINE_MANA_MED list( /obj/item/food/grown/poppy/lily, /obj/item/food/grown/poppy/geranium, + /obj/item/food/grown/sunflower/moonflower, ) #define NATURE_SHRINE_MANA_MED_COUNT = 20 @@ -16,5 +18,35 @@ #define NATURE_SHRINE_MANA_HIGH list( /obj/item/food/grown/poppy/geranium/fraxinella, /obj/item/food/grown/poppy/lily/trumpet, + /obj/item/food/grown/novaflower, ) #define NATURE_SHRINE_MANA_HIGH_COUNT = 30 + +/datum/mana_pool/magic_altar/nature + maximum_mana_capacity = 750 + softcap = 500 + amount = 0 + max_donation_rate_per_second = 2 + +/obj/structure/magic_altar/nature + name = "The Stump Which Watches" + desc = "A peculiar stump. It feels like the hole in the center is looking at you. It looks like you can cover its gaze with some flowers, though." + icon_state = "magicstump_base" + +/obj/structure/magic_altar/nature/get_initial_mana_pool_type() + return /datum/mana_pool/magic_altar/nature + +/obj/structure/magic_altar/nature/attackby(obj/item/attack_item, mob/living/user, params) + ..() + if (attack_item in NATURE_SHRINE_MANA_LOW) + mana_pool += NATURE_SHRINE_MANA_LOW_COUNT + QDEL_NULL(attack_item) + return + if (attack_item in NATURE_SHRINE_MANA_MED) + mana_pool += NATURE_SHRINE_MANA_MED_COUNT + QDEL_NULL(attack_item) + return + if (attack_item in NATURE_SHRINE_MANA_HIGH) + mana_pool += NATURE_SHRINE_MANA_HIGH_COUNT + QDEL_NULL(attack_item) + return diff --git a/maplestation_modules/code/modules/magic/story_spells/night_vision.dm b/maplestation_modules/code/modules/magic/story_spells/eyes_of_night.dm similarity index 100% rename from maplestation_modules/code/modules/magic/story_spells/night_vision.dm rename to maplestation_modules/code/modules/magic/story_spells/eyes_of_night.dm From 69343c33af6207dd3d7f9cdb5e21145ec8b37e3b Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 25 Aug 2025 19:51:10 -0400 Subject: [PATCH 16/58] fixes eyes of night, makes nature shrine actually work --- maplestation.dme | 1 + .../items/spellbook_item_cantrips.dm | 2 +- .../mana/sources/altars/nature_shrine.dm | 61 +++++++++---------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/maplestation.dme b/maplestation.dme index 538bc2dc9806..9d927f2d6546 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6504,6 +6504,7 @@ #include "maplestation_modules\code\modules\magic\mana\attunements\attunement.dm" #include "maplestation_modules\code\modules\magic\mana\sources\mana_batteries.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\_magic_altars.dm" +#include "maplestation_modules\code\modules\magic\mana\sources\altars\nature_shrine.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leylines.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_attunements.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_intensities.dm" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index b83c35fe7411..70b5f211456a 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -237,7 +237,7 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT .["greater"] = new /datum/spellbook_customization_entry/boolean("greater", "Greater, stronger, shorter lasting version", "A more expensive and shorter lasting form of Sense Equilibrium which allows the user to pinpoint the exact effect they wish the spell to have.") /datum/spellbook_item/spell/eyes_of_night - name "Eyes of Night" + name = "Eyes of Night" description = "Attune your eyes to see better in the dark." lore = "A staple of dark mages, and one of the most commonly used dark magic spells, this spell allows one to see within the dark without illuminating the surronding area." diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index f9d0b42e3a0e..34ab21ec139c 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -1,27 +1,6 @@ // nature shrine, consumes flowers to generate mana. // this lists of flowers based on the amount of mana generated -#define NATURE_SHRINE_MANA_LOW list( - /obj/item/food/grown/poppy, - /obj/item/food/grown/sunflower, -) -#define NATURE_SHRINE_MANA_LOW_COUNT = 10 - -#define NATURE_SHRINE_MANA_MED list( - /obj/item/food/grown/poppy/lily, - /obj/item/food/grown/poppy/geranium, - /obj/item/food/grown/sunflower/moonflower, - -) -#define NATURE_SHRINE_MANA_MED_COUNT = 20 - -#define NATURE_SHRINE_MANA_HIGH list( - /obj/item/food/grown/poppy/geranium/fraxinella, - /obj/item/food/grown/poppy/lily/trumpet, - /obj/item/food/grown/novaflower, -) -#define NATURE_SHRINE_MANA_HIGH_COUNT = 30 - /datum/mana_pool/magic_altar/nature maximum_mana_capacity = 750 softcap = 500 @@ -30,23 +9,41 @@ /obj/structure/magic_altar/nature name = "The Stump Which Watches" - desc = "A peculiar stump. It feels like the hole in the center is looking at you. It looks like you can cover its gaze with some flowers, though." + desc = "A peculiar stump. It feels like the hole in the center is looking at you. It appears you can cover its gaze with some flowers, though." icon_state = "magicstump_base" + var/static/list/nature_shrine_mana_low = typecacheof(list( + /obj/item/food/grown/poppy, + /obj/item/food/grown/sunflower + )) + var/nature_shrine_mana_low_count = 10 + var/static/list/nature_shrine_mana_med = typecacheof(list( + /obj/item/food/grown/poppy/lily, + /obj/item/food/grown/poppy/geranium, + /obj/item/food/grown/moonflower, + )) + var/nature_shrine_mana_med_count = 20 + var/static/list/nature_shrine_mana_high = typecacheof(list( + /obj/item/food/grown/poppy/geranium/fraxinella, + /obj/item/food/grown/trumpet, + /obj/item/grown/novaflower, + )) + var/nature_shrine_mana_high_count = 30 + /obj/structure/magic_altar/nature/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar/nature -/obj/structure/magic_altar/nature/attackby(obj/item/attack_item, mob/living/user, params) +/obj/structure/magic_altar/nature/item_interaction( mob/living/user, obj/item/sacrifice, list/modifiers) ..() - if (attack_item in NATURE_SHRINE_MANA_LOW) - mana_pool += NATURE_SHRINE_MANA_LOW_COUNT - QDEL_NULL(attack_item) + if (is_type_in_typecache(sacrifice, nature_shrine_mana_high)) // todo: add feedback to the player for this + mana_pool.amount += nature_shrine_mana_high_count + QDEL_NULL(sacrifice) return - if (attack_item in NATURE_SHRINE_MANA_MED) - mana_pool += NATURE_SHRINE_MANA_MED_COUNT - QDEL_NULL(attack_item) + if (is_type_in_typecache(sacrifice, nature_shrine_mana_med)) + mana_pool.amount += nature_shrine_mana_med_count + QDEL_NULL(sacrifice) return - if (attack_item in NATURE_SHRINE_MANA_HIGH) - mana_pool += NATURE_SHRINE_MANA_HIGH_COUNT - QDEL_NULL(attack_item) + if (is_type_in_typecache(sacrifice, nature_shrine_mana_low)) + mana_pool.amount += nature_shrine_mana_low_count + QDEL_NULL(sacrifice) return From 4c0745378e862627c789e868aa54e11ca8a61d1a Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 9 Sep 2025 14:58:44 -0400 Subject: [PATCH 17/58] first bits of work on oculory, refactors nature shrine --- .../code/__HELPERS/object_helpers.dm | 76 +++++++++++++++++++ .../code/modules/magic/components/has_mana.dm | 30 -------- .../mana/sources/altars/_magic_altars.dm | 18 +++++ .../mana/sources/altars/nature_shrine.dm | 17 +++-- .../mana/sources/altars/stellar_oculory.dm | 69 +++++++++++++++++ .../magic/mana/sources/mana_batteries.dm | 5 ++ 6 files changed, 177 insertions(+), 38 deletions(-) create mode 100644 maplestation_modules/code/__HELPERS/object_helpers.dm delete mode 100644 maplestation_modules/code/modules/magic/components/has_mana.dm create mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm diff --git a/maplestation_modules/code/__HELPERS/object_helpers.dm b/maplestation_modules/code/__HELPERS/object_helpers.dm new file mode 100644 index 000000000000..84eebd31aa65 --- /dev/null +++ b/maplestation_modules/code/__HELPERS/object_helpers.dm @@ -0,0 +1,76 @@ +// code that checks for starlight on a movable atom. pillaged from starlight condensation, but not used there because we're a modular codebase, so lets pretend we did that +#define FULL_STARLIGHT 2 +#define PARTIAL_STARLIGHT 1 +#define NO_STARLIGHT 0 + +/atom/movable/proc/checktilestarlightdirectional(turf/turf_to_check, direction, starlight_max_range) + if(direction == UP) + turf_to_check = GET_TURF_ABOVE(turf_to_check) + if(!turf_to_check) + return NO_STARLIGHT + var/area/area_to_check = get_area(turf_to_check) + var/levels_of_glass = 0 // Since starlight condensation only works 2 tiles to the side anyways, it shouldn't work with like 100 z-levels of glass + while(levels_of_glass <= starlight_max_range) + // Outdoors covers lavaland and unroofed areas but with tiles under, + // while space covers normal space and those caused by explosions, + // if there is a floor tile when checking above, that means + // a roof exists so the outdoors should only work downwards + if(isspaceturf(turf_to_check) || (area_to_check.outdoors && direction == DOWN)) + if (levels_of_glass) + return PARTIAL_STARLIGHT // Glass gives a penalty. + return FULL_STARLIGHT // No glass = can activate fully. + + // Our turf is transparent, but it's NOT openspace - it's something like glass which reduces power + if(istransparentturf(turf_to_check) && !(istype(turf_to_check, /turf/open/openspace))) + levels_of_glass += 1 + + // Our turf is transparent OR openspace - we can check higher or lower z-levels + if(istransparentturf(turf_to_check) || istype(turf_to_check, /turf/open/openspace)) + // Check above or below us + if(direction == UP) + turf_to_check = GET_TURF_ABOVE(turf_to_check) + else + turf_to_check = GET_TURF_BELOW(turf_to_check) + + // If we found a turf above or below us, + // then we can rerun the loop on the newly found turf / area + // (Probably, with +1 to levels_of_glass) + if(turf_to_check) + area_to_check = get_area(turf_to_check) + continue + + // If we didn't find a turf above or below us - + // Checking below, we assume that space is below us (as we're standing on station) + // Checking above, we check that the area is "outdoors" before assuming if it is space or not. + else + if(direction == DOWN || (direction == UP && area_to_check.outdoors)) + if (levels_of_glass) + return PARTIAL_STARLIGHT + return FULL_STARLIGHT + + return NO_STARLIGHT // Hit a non-space, Non-transparent turf - no starlight for you + +/atom/movable/proc/checktilestarlight(turf/original_turf, satisfied_with_penalty, starlight_max_range) + var/current_starlight_level = checktilestarlightdirectional(original_turf, DOWN, starlight_max_range) + if(current_starlight_level == FULL_STARLIGHT) + return current_starlight_level + if(current_starlight_level && satisfied_with_penalty) // do not care if there is a +penalty or no + return current_starlight_level + var/starlight_level_from_above = checktilestarlightDirectional(original_turf, UP, starlight_max_range) + if(starlight_level_from_above > current_starlight_level) + return starlight_level_from_above + else + return current_starlight_level + +/atom/movable/proc/checkstarlight(check_range) + var/starlight_max_range = check_range + var/turf/turf_of_target = get_turf(src) + switch(checktilestarlight(turf_of_target, FALSE, starlight_max_range)) + if(PARTIAL_STARLIGHT) + return PARTIAL_STARLIGHT + if(FULL_STARLIGHT) + return FULL_STARLIGHT + for(var/turf/turf_to_check in view(src, starlight_max_range)) + if(checktilestarlight(turf_to_check, TRUE, starlight_max_range)) + return PARTIAL_STARLIGHT + return NO_STARLIGHT diff --git a/maplestation_modules/code/modules/magic/components/has_mana.dm b/maplestation_modules/code/modules/magic/components/has_mana.dm deleted file mode 100644 index 3447259c0683..000000000000 --- a/maplestation_modules/code/modules/magic/components/has_mana.dm +++ /dev/null @@ -1,30 +0,0 @@ -/* Design notes: -* This component designates the parent datum as, through some mechanism, being a mana "source". -* -* When a request is put in to get available mana sources to a specific entity, datums with these componenets -* should be what is returned. -* HOW WE WILL GATHER DATUMS WITH THIS: As GetComponent is a crutch, this can likely be done through the use -* of firing a signal off the entity and having has_mana listen for it. (How? Have EVERY has_mana instance run a proc? -* THat can get out of hand fast. Need some way to only have things that might actually be available returned. Maybe -* we can, upon certain evenets occuring, such as an item being picked up, we can add it to a list associated with a -* specific entity?) -/** WHEN: It is likely the signal will be fired off by uses_mana components searching for available mana sources. When -* players desire to know their available mana, as well. -* -* has_mana instances should, at a minimum, have some way to generate mana. It doesn't necessarily have to store mana, just -* generate it. -* A possible use: Transmutation magic. A spell with the has_mana component. Upon a mana request being filed, a proc will be called that -* 1. will cast the spell, and 2. return a designated amount of mana. -* ANother use: Mana crystals. This one will have a variable holding mana, and apon mana request, will drain the designated amount from -* the crystal and provide it to the requestee. -*/ - -/// Designates the parent datum as, through some mechanism, being a mana "source". -/datum/component/has_mana - -// I'm not sure -/datum/component/has_mana/Initialize(...) - . = ..() - - RegisterSignal(???, putcomsighere, PROC_REF(mana_request_reaction)) -*/ diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index 1364359e182f..11468ff7ba31 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -6,6 +6,8 @@ softcap = 500 amount = 500 max_donation_rate_per_second = 2 // pretty slow, but a solid source of mana + intrinsic_recharge_sources = NONE // it generate magic stoopid + discharge_destinations = NONE // yeah no i don't want the default to be dumping it into the leylines w/o being balanced around it /datum/mana_pool/magic_altar/can_transfer(datum/mana_pool/target_pool) if (QDELETED(target_pool.parent)) @@ -29,3 +31,19 @@ /obj/structure/magic_altar/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar + +/obj/machinery/power/magic_contraption // used for magitech stuff that needs to process. + name = "magic contraption basetype" + desc = "an honestly quite dull magic altar; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" + icon = 'maplestation_modules/icons/obj/magic/altars.dmi' + icon_state = "goner" + + use_power = NO_POWER_USE + anchored = FALSE + + has_initial_mana_pool = TRUE + var/max_allowed_transfer_distance = MAGIC_ALTAR_MAX_TRANSFER_DISTANCE + +/obj/machinery/power/magic_contraption/get_initial_mana_pool_type() + return /datum/mana_pool/magic_altar + diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index 34ab21ec139c..5a93be69054f 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -5,7 +5,7 @@ maximum_mana_capacity = 750 softcap = 500 amount = 0 - max_donation_rate_per_second = 2 + max_donation_rate_per_second = 4 /obj/structure/magic_altar/nature name = "The Stump Which Watches" @@ -33,17 +33,18 @@ /obj/structure/magic_altar/nature/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar/nature -/obj/structure/magic_altar/nature/item_interaction( mob/living/user, obj/item/sacrifice, list/modifiers) +/obj/structure/magic_altar/nature/item_interaction(mob/living/user, obj/item/sacrifice, list/modifiers) ..() if (is_type_in_typecache(sacrifice, nature_shrine_mana_high)) // todo: add feedback to the player for this - mana_pool.amount += nature_shrine_mana_high_count - QDEL_NULL(sacrifice) + accept_sacrifice(sacrifice, nature_shrine_mana_high) return if (is_type_in_typecache(sacrifice, nature_shrine_mana_med)) - mana_pool.amount += nature_shrine_mana_med_count - QDEL_NULL(sacrifice) + accept_sacrifice(sacrifice, nature_shrine_mana_med) return if (is_type_in_typecache(sacrifice, nature_shrine_mana_low)) - mana_pool.amount += nature_shrine_mana_low_count - QDEL_NULL(sacrifice) + accept_sacrifice(sacrifice, nature_shrine_mana_low) return + +/obj/structure/magic_altar/nature/proc/accept_sacrifice(obj/item/sacrifice, mana_value) + QDEL_NULL(sacrifice) + mana_pool.amount += mana_value diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm new file mode 100644 index 000000000000..e30ad46551ec --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -0,0 +1,69 @@ +// Stellar oculory. A more technomagic themed altar, which generates mana from exposure to starlight, based heavily off of starlight regeneration. +#define COMSIG_STELLAR_OCCULORY_PULSE_MANA "occulory_pulse_mana" + +/datum/mana_pool/magic_altar/stellar + maximum_mana_capacity = 225 + softcap = 225 // identical to max cap, as it its a passive generator, and not an active one. + amount = 0 + max_donation_rate_per_second = 4 + +/obj/machinery/power/magic_contraption/stellar + name = "stellar occulory" + desc = "an advanced machine which focuses starlight into mana for use." + // icon_state = stellar + // base_icon_state = stellar + var/active = FALSE + + var/pulse_delay = 20 SECONDS + var/last_pulse = 0 + + var/high_pulse_value = 25 // full starlight + var/medium_pulse_value = 15 // partial starlight + var/low_pulse_value = 5 // basically a pity value. + + var/starlight_check_range = 3 + +/obj/machinery/power/magic_contraption/stellar/get_initial_mana_pool_type() + return /datum/mana_pool/magic_altar/stellar + +/obj/machinery/power/magic_contraption/stellar/Initialize(mapload) + . = ..() + SSmachines.processing += src + +/obj/machinery/power/magic_contraption/stellar/interact(mob/user) + if(active) + active = FALSE + if(!active) + active = TRUE + +/obj/machinery/power/magic_contraption/stellar/process(seconds_per_tick) + . = ..() + if(!active) + return + if(!check_delay()) + return + if(mana_pool.maximum_mana_capacity = mana_pool.amount) + return + // send signal activate check comsig here + var/starlight_level = CheckStarlight(starlight_check_range) + pulse_mana(starlight_level) + +/obj/machinery/power/magic_contraption/stellar/proc/check_delay() + if((last_pulse + pulse_delay) <= world.time) + return TRUE + return FALSE + +/obj/machinery/power/magic_contraption/stellar/proc/pulse_mana(starlight_level) + var/pulse_value = 0 + switch(starlight_level) + if(FULL_STARLIGHT) + pulse_value = high_pulse_value + if(PARTIAL_STARLIGHT) + pulse_value = medium_pulse_value + if(NO_STARLIGHT) + pulse_value = low_pulse_value + // anims here + // also update sprite + mana_pool.amount += pulse_value + last_pulse = world.time + diff --git a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm index 6c2b6edd85e5..630d1e229c49 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm @@ -1,5 +1,7 @@ /datum/mana_pool/mana_battery amount = 0 + intrinsic_recharge_sources = NONE + discharge_destinations = NONE /datum/mana_pool/mana_battery/can_transfer(datum/mana_pool/target_pool) if (QDELETED(target_pool.parent)) @@ -165,6 +167,9 @@ amount = 0 ethereal_recharge_rate = 0.5 + intrinsic_recharge_sources = NONE // it already regens mana natively, and should generally be reliable + discharge_destinations = NONE + /obj/item/clothing/neck/mana_star name = "Volite Amulet" desc = "A cut volite crystal placed within a gilded amulet. It naturally draws and fixes mana for your use." From ba9c6d933712d8b5cb3fc62c6fa8e02506f4d1f8 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 11 Sep 2025 02:03:09 -0400 Subject: [PATCH 18/58] manually kills has_mana in the dme --- maplestation.dme | 1 - 1 file changed, 1 deletion(-) diff --git a/maplestation.dme b/maplestation.dme index 9d927f2d6546..7a55f2742382 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6493,7 +6493,6 @@ #include "maplestation_modules\code\modules\loadouts\loadout_ui\loadout_manager.dm" #include "maplestation_modules\code\modules\loadouts\loadout_ui\loadout_outfit_helpers.dm" #include "maplestation_modules\code\modules\magic\spell.dm" -#include "maplestation_modules\code\modules\magic\components\has_mana.dm" #include "maplestation_modules\code\modules\magic\components\uses_mana.dm" #include "maplestation_modules\code\modules\magic\mana\living_mana.dm" #include "maplestation_modules\code\modules\magic\mana\magic_wands.dm" From 01728b7a5337cae30ec4378f5936c76e4326d37a Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Fri, 31 Oct 2025 17:45:49 -0400 Subject: [PATCH 19/58] stellar occulory just works now i guess --- maplestation.dme | 2 ++ .../code/__HELPERS/object_helpers.dm | 2 +- .../magic/mana/sources/altars/_magic_altars.dm | 4 ++-- .../mana/sources/altars/stellar_oculory.dm | 15 +++++++++------ maplestation_modules/icons/obj/magic/altars.dmi | Bin 784 -> 890 bytes 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/maplestation.dme b/maplestation.dme index 42e85be2077d..219bba577371 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6285,6 +6285,7 @@ #include "maplestation_modules\code\__DEFINES\subsystems\_module_subsystem_defines.dm" #include "maplestation_modules\code\__DEFINES\subsystems\_module_subsystem_priorities.dm" #include "maplestation_modules\code\__HELPERS\magic_helpers.dm" +#include "maplestation_modules\code\__HELPERS\object_helpers.dm" #include "maplestation_modules\code\__HELPERS\text_helpers.dm" #include "maplestation_modules\code\controllers\configuration\entries\autotransfer.dm" #include "maplestation_modules\code\controllers\subsystem\autotransfer.dm" @@ -6600,6 +6601,7 @@ #include "maplestation_modules\code\modules\magic\mana\sources\mana_batteries.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\_magic_altars.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\nature_shrine.dm" +#include "maplestation_modules\code\modules\magic\mana\sources\altars\stellar_oculory.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leylines.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_attunements.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_intensities.dm" diff --git a/maplestation_modules/code/__HELPERS/object_helpers.dm b/maplestation_modules/code/__HELPERS/object_helpers.dm index 84eebd31aa65..f23bab31d2c3 100644 --- a/maplestation_modules/code/__HELPERS/object_helpers.dm +++ b/maplestation_modules/code/__HELPERS/object_helpers.dm @@ -56,7 +56,7 @@ return current_starlight_level if(current_starlight_level && satisfied_with_penalty) // do not care if there is a +penalty or no return current_starlight_level - var/starlight_level_from_above = checktilestarlightDirectional(original_turf, UP, starlight_max_range) + var/starlight_level_from_above = checktilestarlightdirectional(original_turf, UP, starlight_max_range) if(starlight_level_from_above > current_starlight_level) return starlight_level_from_above else diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index 11468ff7ba31..be31ebddb0bb 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -34,9 +34,9 @@ /obj/machinery/power/magic_contraption // used for magitech stuff that needs to process. name = "magic contraption basetype" - desc = "an honestly quite dull magic altar; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" + desc = "an honestly quite dull magic contraption; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" icon = 'maplestation_modules/icons/obj/magic/altars.dmi' - icon_state = "goner" + icon_state = "goner_machine" use_power = NO_POWER_USE anchored = FALSE diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index e30ad46551ec..a49fdda3cac7 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -10,8 +10,8 @@ /obj/machinery/power/magic_contraption/stellar name = "stellar occulory" desc = "an advanced machine which focuses starlight into mana for use." - // icon_state = stellar - // base_icon_state = stellar + icon_state = "stellar" + base_icon_state = "stellar" var/active = FALSE var/pulse_delay = 20 SECONDS @@ -19,7 +19,7 @@ var/high_pulse_value = 25 // full starlight var/medium_pulse_value = 15 // partial starlight - var/low_pulse_value = 5 // basically a pity value. + var/low_pulse_value = 5 // basically a pity value var/starlight_check_range = 3 @@ -33,19 +33,20 @@ /obj/machinery/power/magic_contraption/stellar/interact(mob/user) if(active) active = FALSE + to_chat(user, span_warning("deactivated")) // debug if(!active) + to_chat(user, span_warning("activated")) //debug active = TRUE /obj/machinery/power/magic_contraption/stellar/process(seconds_per_tick) - . = ..() if(!active) return if(!check_delay()) return - if(mana_pool.maximum_mana_capacity = mana_pool.amount) + if(mana_pool.maximum_mana_capacity == mana_pool.amount) return // send signal activate check comsig here - var/starlight_level = CheckStarlight(starlight_check_range) + var/starlight_level = src.checkstarlight(starlight_check_range) pulse_mana(starlight_level) /obj/machinery/power/magic_contraption/stellar/proc/check_delay() @@ -62,6 +63,8 @@ pulse_value = medium_pulse_value if(NO_STARLIGHT) pulse_value = low_pulse_value + else + pulse_value = 1 // debug // anims here // also update sprite mana_pool.amount += pulse_value diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi index b11b69be52e2aa3c45fe684ec57e4cadadc422ce..72d9e3b8d82f1ba07d8111a54909d25d6a4ad807 100644 GIT binary patch delta 707 zcmV;!0zCbY2Kok&7Y;xO0{{R3owtGP0000*ktIVL`|>tl&E(r4wNL;600DGTPE!Ct z=GbNc005AYeQ|#Yst21IpPQJRk(ozWb#X~*PEI0DS12pE`niBT2LO6GLV77n2KoR1 z0!K+iK~z|U?UdVg;xG(FiQ9yXFXRH#|NqoVN0Kck@YIKy#p-z=M$X>Ya>C{EUuDp| znh%FUl({7d8|pxDuG9lf#h7aP0(v1WC^! zU^s;;h=haxsDXhLk>?ZrKKRcX7-$X21Ox3L>LY+lls%{*gqZ~T2;h=XY63dGF?&Jg ziV5iE+dO|4T|NwDrV>g03VMNGLBP)yzk-623YLr>488{gdXN{MUrXQ~sKI!ymDL1t zj5)(W7du81$nTW`2VJb7f~e;xj*J0LF^V7=07t<9d@_L;#;ZNbGz4z~G2CW*lx0|w z39=fb6})-nZ3}7$GZgfxeA@!uD=p-=QQFA0x&?o_S5{8PdDFd6%~r6nA!-Y?ja-PE z2zE9k+r4yx3u!lj7~nwUOWaH#1~?G;l6Do`H#P`WlbPS{Jpb6)AXH6Zet(EyVMEN# zfgu$a5v*)Tr8zL9;%WjmZ2cCvvY3Dkd%p#)tST_W);6#?z8dznfxY9KVRLxnn_+jj z=be9{W^ueT)T|v(22w0Ne)sbaQmj4R@le!dFnvEvlcFwz=_B48Pig0PN&n_2u|I)V z)xVm4-c{d3aBhX2dBNX6@SA^|Z$3p!RcBrHmjDX@002ovPDHLkV1lKMJqrK; delta 600 zcmV-e0;m1@29O4j7Y-l@0{{R3l|zoU0000#ktIVFoLb_A00001bW%=J06^y0W&i*H ze3653e{rc-R&e!m0XqW#+AS#fhd4{j0005^Nkl%s>pcG{c0S}vl+oD)I&_4QxHrtxV#XndrzTd}{$~UXw1;ehjVefb z1u!J3K?Na166h7ckdc}KI=;PlLE(%E=;eEiRksgAjg%s(-@z*II|%q(^*g9Yso*T= zf5GN^u%QR#j5rHKUwA0SHkf|ACM=U; mY=h}nd^+CJ&he4{*Z2!iH!h72Hm5`Y0000 Date: Sun, 2 Nov 2025 16:55:31 -0500 Subject: [PATCH 20/58] removes some debug/redundant code --- .../modules/magic/mana/sources/altars/stellar_oculory.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index a49fdda3cac7..56a6b1b3a405 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -26,10 +26,6 @@ /obj/machinery/power/magic_contraption/stellar/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar/stellar -/obj/machinery/power/magic_contraption/stellar/Initialize(mapload) - . = ..() - SSmachines.processing += src - /obj/machinery/power/magic_contraption/stellar/interact(mob/user) if(active) active = FALSE @@ -63,8 +59,6 @@ pulse_value = medium_pulse_value if(NO_STARLIGHT) pulse_value = low_pulse_value - else - pulse_value = 1 // debug // anims here // also update sprite mana_pool.amount += pulse_value From f93beb7d83134064e8747662f43be5f994f0b5c7 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 10 Nov 2025 14:10:23 -0500 Subject: [PATCH 21/58] adds in code for alt wands + recipes, updates sprite for occulory --- .../datums/components/crafting/recipes.dm | 20 +++++++++++++++++- .../code/modules/magic/mana/magic_wands.dm | 18 ++++++++++++++-- .../mana/sources/altars/psychic_chamber.dm | 13 ------------ .../icons/obj/magic/altars.dmi | Bin 890 -> 1233 bytes 4 files changed, 35 insertions(+), 16 deletions(-) delete mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm diff --git a/maplestation_modules/code/datums/components/crafting/recipes.dm b/maplestation_modules/code/datums/components/crafting/recipes.dm index bcb3c83df58d..faa8c462913b 100644 --- a/maplestation_modules/code/datums/components/crafting/recipes.dm +++ b/maplestation_modules/code/datums/components/crafting/recipes.dm @@ -34,7 +34,8 @@ result = /obj/item/clothing/neck/mana_star reqs = list( /obj/item/mana_battery/mana_crystal/cut = 1, - /obj/item/stack/sheet/mineral/gold = 1, // cheap for now + /obj/item/stack/sheet/cloth = 2, + /obj/item/stack/sheet/mineral/gold = 4, // not so cheap now ) tool_behaviors = list(TOOL_SCREWDRIVER) time = 5 SECONDS @@ -50,3 +51,20 @@ tool_behaviors = list(TOOL_CROWBAR) time = 5 SECONDS category = CAT_EQUIPMENT + +/datum/crafting_recipe/scrapwand + name = "Makeshift Wand" + result = /obj/item/magic_wand + reqs = list( + /obj/item/pen = 1, + /obj/item/stack/rods = 1, + /obj/item/stack/cable_coil = 3, + ) + +/datum/crafting_recipe/woodenwand + name = "Makeshift Wand" + result = /obj/item/magic_wand/wooden + reqs = list( + /obj/item/stack/sheet/mineral/wood = 2, + /obj/item/stack/sheet/mineral/gold = 1, + ) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index e24a6e1424c8..cac4c2570a16 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -1,7 +1,7 @@ // wands, basically magic wrenches, their main use is to initiate and manage player magic transfer /obj/item/magic_wand name = "Makeshift Wand" - desc = "A 'wand' made out of scraps and reused office materials. Unless this is a part of your religion or something, you should probably ditch this for something better." + desc = "A 'wand' made out of scraps and reused office materials. Unless this is a part of your religion or something, you should probably ditch this for something better when you can." icon = 'maplestation_modules/icons/obj/magic/wands.dmi' icon_state = "makeshift" w_class = WEIGHT_CLASS_NORMAL // meant to be big and hard to store, additional reason to not use this @@ -32,7 +32,7 @@ var/transfer_confirmation = (tgui_alert(user, "Do you want to transfer mana from [interacting_with]?", "Transfer Mana?", options) == "Yes") if(!transfer_confirmation || QDELETED(user) || QDELETED(src) || !user.is_holding(src)) return - balloon_alert(user, "transferring mana....") + balloon_alert(user, "transferring mana...") target_mana_pool.start_transfer(user_pool) /* /obj/item/magic_wand/attack_self(mob/user, modifiers) @@ -42,3 +42,17 @@ balloon_alert(user, "canceled draw") mana_pool.stop_transfer(user.mana_pool) return */ + +/obj/item/magic_wand/techie + name = "Arcane Field Modulator" + desc = "An overengineered device produced and researched on board to manipulate and move residual mana within objects." + icon = 'maplestation_modules/icons/obj/magic/wands.dmi' + icon_state = "makeshift" + w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets + +/obj/item/magic_wand/wooden + name = "Wooden Wand" + desc = "A traditional wood body and gold capped wand. Can still manipulate mana surprisingly well for its simplicity." + icon = 'maplestation_modules/icons/obj/magic/wands.dmi' + icon_state = "makeshift" + w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm deleted file mode 100644 index 421e9bf81c43..000000000000 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/psychic_chamber.dm +++ /dev/null @@ -1,13 +0,0 @@ -/obj/structure/closet/psychicchamber - name = "psychic energy accumulation chamber" - desc = "A specialized psychic chamber (locker) lined with magic materials (reflective metals and trace volite) made to amplify and collect the psychic energy emanated by your brain (make you instensely hallucinate and regenerate mana reserves)" - icon_state = "abductor" - icon_door = "abductor" - can_weld_shut = FALSE - door_anim_time = 0 - -/obj/structure/closet/psychicchamber/proc/apply_effects(mob/living/target) - if(!target.incapacitated(IGNORE_STASIS)) // CHANGE THIS TO CHECK THINGS THAT WOULD PREVENT YOU FROM GETTING GEEKED - target.apply_status_effect(/datum/status_effect/grouped/stasis, REF(src)) - to_chat(target, span_notice("You feel a cold, numbing sensation...")) - //RegisterSignal(target, COMSIG_LIVING_EARLY_UNARMED_ATTACK, PROC_REF(skip_to_attack_hand)) diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi index 72d9e3b8d82f1ba07d8111a54909d25d6a4ad807..03709e8823749263a0a0686d11534dd5877afed3 100644 GIT binary patch delta 981 zcmV;`11kLb2GI$SBmr-cB||hABQqsAMMGO;5*Q~S|E#G0;tC5I3lu0KCOH7Sl{7d@ zPEKV{8vwLg0ROcB|NnFTeR6J*a;tv>bV)=(R9J=0)QfVPFc1Y$n*^Kkhz*VuT#zAl z{{I_$_aTrRr-gK;)9nlh!9A>m)6M3;s;$;n_YD_d= zC$=0+(>*Fp*@%RMgS%{p%64odpYlIazXuq`0_U@x-vcrtf%6>AQDTGw=Q)2`pu`A; zQu7*?6A7iVp3 z=c!mg4}}M|SV68o0Y2rj1_hEN1E4D-vXb)8Id77(^9+1yimTchUKcffaeO1K< zPJTjxT)(3jB@g&3<^mKxz(&Ob&KDjKA>I3*GKQS@fCw*{|0&C`Dm+lCAX`C;*SueX z3Q5KUj+&pBfM;b3>90|?k>;i);92P$pYui6f;rzoO+v0)sM|;rc`biHLqg$KFFQdK zMdJYx*x-_jy!LL5P}&Afmn%FjX_#OM4hG(kMf2f|c` zARh=*9iu!15QjK^3h#fvf;h(UD9^;y2BlATw?Ry8Q2IVT8xPZg@n!m7l`(%2wq|22 zAHJD?v!=DSH5hy^|MrG73>pMC{C@)R}c?4cz!g)0P+H~a{i~&G$V1=`sDZ@*2@H%k)W`tk`zRa(A<{eUfdDN4 z$h+mh0HF(k4*6j*uyJ_SIX4LdE}#Y<;ST_s9eR`sGVbs8@VABM@j~pHb8^IGzalR^ z;BSExIj?%Z^uVhYfIh&=JQF0)+k13Hk<*BmqT{B|{4P@-|=1yKEEhHuC%6)rrIW*u$#Crifdom{XY25 z8W?B|$pi!KAnGH4OO!pRAcUC&`Uv2XP-+4?zA<}2=86gE=G#0MT|NwDrV>g03VMNG zLBP)yzk-623YLr>488{gdXN{MUrXQ~sKI!yf0fk)a*R2{K^Hql6UgtC0ta2Jpn|C9 zD2|K)PBDrg830GY0DLlm7{;qT$}|LT0x{fXdz58Zk_oaJq!qk*2wYmkmS5{8PdDFd6%~r6nA!-Y?ja-PE2zE9k+r4yx3u!lj7~nwUOWaH# ze+D=Z`I2@O+&4A|Rg;Cln_+W!&X1-$)N$E? Date: Thu, 13 Nov 2025 21:54:00 -0500 Subject: [PATCH 22/58] repathing, removes the old aeromancy file, touches up wands --- maplestation.dme | 4 ++-- .../code/datums/components/crafting/recipes.dm | 2 +- .../{spellbook_entry.dm => _spellbook_entry.dm} | 0 ...spell_entry.dm => _spellbook_spell_entry.dm} | 0 .../spellbook/items/spellbook_item_aeromancy.dm | 15 --------------- .../code/modules/magic/mana/magic_wands.dm | 4 ++-- maplestation_modules/icons/obj/magic/wands.dmi | Bin 341 -> 463 bytes 7 files changed, 5 insertions(+), 20 deletions(-) rename maplestation_modules/code/modules/client/preferences/spellbook/items/{spellbook_entry.dm => _spellbook_entry.dm} (100%) rename maplestation_modules/code/modules/client/preferences/spellbook/items/{spellbook_spell_entry.dm => _spellbook_spell_entry.dm} (100%) delete mode 100644 maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_aeromancy.dm diff --git a/maplestation.dme b/maplestation.dme index 14a5f96fac95..a804af252844 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6514,10 +6514,10 @@ #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_helpers.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_item_customization_menu.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\spellbook_manager.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_entry.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\_spellbook_entry.dm" +#include "maplestation_modules\code\modules\client\preferences\spellbook\items\_spellbook_spell_entry.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_cantrips.dm" #include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_item_manipulation.dm" -#include "maplestation_modules\code\modules\client\preferences\spellbook\items\spellbook_spell_entry.dm" #include "maplestation_modules\code\modules\client\verbs\looc.dm" #include "maplestation_modules\code\modules\clothing\digi_clothing.dm" #include "maplestation_modules\code\modules\clothing\accessories\accessories.dm" diff --git a/maplestation_modules/code/datums/components/crafting/recipes.dm b/maplestation_modules/code/datums/components/crafting/recipes.dm index faa8c462913b..9416ceba2ad7 100644 --- a/maplestation_modules/code/datums/components/crafting/recipes.dm +++ b/maplestation_modules/code/datums/components/crafting/recipes.dm @@ -62,7 +62,7 @@ ) /datum/crafting_recipe/woodenwand - name = "Makeshift Wand" + name = "Gold-Capped Wooden Wand" result = /obj/item/magic_wand/wooden reqs = list( /obj/item/stack/sheet/mineral/wood = 2, diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_entry.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/_spellbook_entry.dm similarity index 100% rename from maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_entry.dm rename to maplestation_modules/code/modules/client/preferences/spellbook/items/_spellbook_entry.dm diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_spell_entry.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/_spellbook_spell_entry.dm similarity index 100% rename from maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_spell_entry.dm rename to maplestation_modules/code/modules/client/preferences/spellbook/items/_spellbook_spell_entry.dm diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_aeromancy.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_aeromancy.dm deleted file mode 100644 index 2f385cd68ee0..000000000000 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_aeromancy.dm +++ /dev/null @@ -1,15 +0,0 @@ -GLOBAL_LIST_INIT(spellbook_aeromancy_items, generate_spellbook_items(SPELLBOOK_CATEGORY_AEROMANCY)) - -/datum/spellbook_item/spell/airhike - name = "Air hike" - description = "Force wind beneath one's feet for a boost of movement where one is facing to jump over 2 tiles or to jump up a Zlevel and a tile ahead." - lore = "A somewhat intermediate spell not from its complexity, but applying proper force that won't have the user spin out of control. \ - A spell that is often grown out of due to its unwieldly application, at least for aeromancers, it is known as a party trick or crude application in the magic community, but it is useful in a pinch.\n\ - A common experiment for early aeromancers after wondering if applying force to oneself is possible. Those that learn through experimentation require training to consistantly control it, eventually moving onto finer control or dropping it after one too many crashes.\n\ - Most scholars might prefer students not to spend too much time blasting themselves wildly due to injuries slowing down or stopping proper study.\n\ - If given a proper clear area, some might argue its a safe way to explain distance, the idea of self as a target, and points of force which can be applied to spells that require finesse.\n\ - The name was given due to mages that appeared to walk on air itself, and like climbing a mountain side, if caution is not taken would be fatigued and fall from their height." - - category = SPELLBOOK_CATEGORY_AEROMANCY - - our_action_typepath = /datum/action/cooldown/spell/airhike diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index cac4c2570a16..b4b26736129f 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -51,8 +51,8 @@ w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets /obj/item/magic_wand/wooden - name = "Wooden Wand" + name = "Gold-Capped Wooden Wand" desc = "A traditional wood body and gold capped wand. Can still manipulate mana surprisingly well for its simplicity." icon = 'maplestation_modules/icons/obj/magic/wands.dmi' - icon_state = "makeshift" + icon_state = "wooden" w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets diff --git a/maplestation_modules/icons/obj/magic/wands.dmi b/maplestation_modules/icons/obj/magic/wands.dmi index b4ffa1ef957e426cc3e09ac9712b91a109345776..d9c70e9a40bc0b1c4daea46ad922bf6273f1d7cc 100644 GIT binary patch delta 375 zcmV--0f_$90?z|~iBL{Q4GJ0x0000DNk~Le0000$0000W2m=5B0F^_Iwg3PCKTu3m zMZmzov|0fF|8q|p0ROcBcs>%JT__$I6{d~|(X$FYCK~qIJXkRfMMp?0D=i!x9Z*qG zK|@J)eSjn;DUFhphq=g=00001bW%=J06^y0W&i*HcY0KjWMY5ARhH-Hr=;fLQl_ln z>gNJ>0RRV$Ch-ad;L`vA0J}**feO~f`j!WJ86YEA7gD>nqsO9vodIAnd V2>8*z9Ay9i002ovPDHLkV1gBQq}2cb delta 231 zcmX@le3i+xGr-TCmrII^fq{Y7)59eQNGpIa3p0>x3`su@q*MZYLR=3VIIygbFNuM$d~g*iMOt{#j!*0D;#hVg8R5gQZN zoq(S{iWyuj7exw8Bo}g(oO3D_KK@3}gw Date: Sat, 15 Nov 2025 14:22:59 -0500 Subject: [PATCH 23/58] house keeping surronding magic charge spells, fixes up and adds splatter casting --- .../items/spellbook_item_cantrips.dm | 23 ------ .../items/spellbook_item_manipulation.dm | 22 ++--- .../modules/magic/story_spells/mana_charge.dm | 80 +++++-------------- 3 files changed, 29 insertions(+), 96 deletions(-) diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index 70b5f211456a..07f28fedf570 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -147,29 +147,6 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT our_action_typepath = /datum/action/cooldown/spell/apply_mutations/mage_hand - -/datum/spellbook_item/spell/mana_sense - name = "Mana Sense" - description = "Sense other mana pools present" - lore = "Using your magical attunement (or other aptitudes) \ - you can sense if a creature or object has a mana pool present; and what amount of mana the pool has. \ - Do note that this will require a reprieve between casts, and it will take a second to discern the amount of mana a pool has." - - category = SPELLBOOK_CATEGORY_CANTRIPS - - our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense - -/datum/spellbook_item/spell/meditate - name = "Magic Meditation" - description = "Use mental focus to draw mana within yourself" - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ - Do note that this will take a while between casts, and you should still find other methods of regeneration." - - category = SPELLBOOK_CATEGORY_CANTRIPS - - our_action_typepath = /datum/action/cooldown/spell/meditate - /datum/spellbook_item/spell/shock_touch name = "Shocking Grasp" description = "Empower your hand to deliver a shock to your target. \ diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm index 005746d5c389..88bcdce6153a 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm @@ -1,16 +1,5 @@ GLOBAL_LIST_INIT(spellbook_manipulation_items, generate_spellbook_items(SPELLBOOK_CATEGORY_MANIPULATION)) -/* /datum/spellbook_item/spell/leyline_charge - name = "Leyline Charge" - description = "Draw mana straight from the leylines themselves." - lore = "The most basic method of regenerating mana on your own. \ - Casting this invocation- while focusing- will allow you to regain mana from the leylines themselves. \ - Do not that this is a finnicky way of regaining mana, and you risk overloading if done improperly." - - category = SPELLBOOK_CATEGORY_MISC - - our_action_typepath = /datum/action/cooldown/spell/leyline_charge */ // disabled because leylines are weirda - /datum/spellbook_item/spell/meditate name = "Magic Meditation" description = "Use mental focus to draw mana within yourself" @@ -32,3 +21,14 @@ GLOBAL_LIST_INIT(spellbook_manipulation_items, generate_spellbook_items(SPELLBOO category = SPELLBOOK_CATEGORY_MANIPULATION our_action_typepath = /datum/action/cooldown/spell/pointed/mana_sense + +/datum/spellbook_item/spell/lesser_splattercasting + name = "Lesser Splattercasting" + description = "Sacrifice some of your vital essence to regain mana" + lore = "A more consistent, but risky, form of regenerating magic. \ + This method mana charging is often seen used among many blood or sacrificial focused cults. \ + Often this spell is a sort of 'gateway drug' for many to begin practicing the dark arts of blood magic." + + category = SPELLBOOK_CATEGORY_MANIPULATION + + our_action_typepath = /datum/action/cooldown/spell/meditate/lesser_splattercasting diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index 4d2e7a2db6c4..350e25fb6010 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -1,41 +1,4 @@ -// spell that recharges your mana by drawing from leylines, temporarily inaccessible because leyline access is weird, and they're underpowered rn -/datum/action/cooldown/spell/leyline_charge - name = "Leyline Charge" - desc = "Regenerate some of your mana by channeling straight from the leylines themselves." - button_icon = 'icons/effects/effects.dmi' - button_icon_state = "plasmasoul" - sound = 'sound/magic/staff_healing.ogg' - - school = SCHOOL_UNSET // no idea where this would go tbh - cooldown_time = 2 MINUTES - invocation_type = INVOCATION_NONE - spell_requirements = NONE - - invocation = "AS'P'RE" - invocation_type = INVOCATION_WHISPER - var/channel_time = 7 SECONDS - - -/datum/action/cooldown/spell/leyline_charge/before_cast(mob/living/cast_on) - . = ..() - if (!cast_on.mana_pool) - cast_on.balloon_alert(cast_on, "no mana pool!") - return - if(!do_after(cast_on, channel_time)) // don't want this casted mid combat - return . | SPELL_CANCEL_CAST - -/datum/action/cooldown/spell/leyline_charge/cast(mob/living/cast_on) - . = ..() - var/randy_value = rand(0,25) // generate a random number, which will be- - var/mana_to_gain = randy_value + 20 // added to the base amount, to get a semi-inconsistent regen amount - var/list/datum/mana_pool/leyline/accessable_leylines = list(get_accessable_leylines()) - if(!accessable_leylines.len) - cast_on.balloon_alert(cast_on, "no accessable leylines!") - return - var/datum/mana_pool/leyline/random_leyline = accessable_leylines[rand(0, accessable_leylines.len)] // get a random leyline - random_leyline.transfer_specific_mana(cast_on.mana_pool, mana_to_gain, decrement_budget = TRUE) - -// recover mana on your own. longer recharge. more is planned, hopefully +// recover mana on your own. longer recharge. /datum/action/cooldown/spell/meditate name = "Meditation" desc = "Regenerate some of your mana by focusing within yourself. Takes a period of time to cast." @@ -49,6 +12,10 @@ spell_requirements = NONE var/base_mana_recharge = 40 // the mana this recharges before a random varience + var/random_value_floor = 0 + var/random_value_ceiling = 25 + + invocation_self_message = "You begin focusing your mind on manipulating ambient mana." invocation = "Focus...." invocation_type = INVOCATION_WHISPER var/channel_time = 12 SECONDS @@ -61,48 +28,37 @@ /datum/action/cooldown/spell/meditate/cast(mob/living/cast_on) . = ..() - to_chat(cast_on, span_alert("You begin focusing your mind on manipulating ambient mana.")) if(!do_after(cast_on, channel_time)) // don't want this casted mid combat return . | SPELL_CANCEL_CAST - var/randy_value = rand(0,25) + var/randy_value = rand(random_value_floor, random_value_ceiling) var/mana_to_gain = randy_value + base_mana_recharge cast_on.mana_pool.adjust_mana(mana_to_gain) // recover mana using your own blood. no protections from using this at low blood volume. -/datum/action/cooldown/spell/lesser_splattercasting +/datum/action/cooldown/spell/meditate/lesser_splattercasting name = "Lesser Splattercasting" desc = "Drain some of your own blood to recover mana. This does not prevent you from bleeding out." - button_icon = 'icons/effects/effects.dmi' - button_icon_state = "plasmasoul" - sound = 'sound/magic/staff_healing.ogg' + button_icon = 'icons/effects/bleed.dmi' + button_icon_state = "bleed10" + sound = 'sound/weapon/slice.ogg' - school = SCHOOL_UNSET // no idea where this would go tbh cooldown_time = 2 MINUTES // shorter as its not from no where - invocation_type = INVOCATION_NONE - spell_requirements = NONE - var/base_mana_recharge = 50 - var/base_bloodloss = 65 // the blood drained before a random variable is added. + base_mana_recharge = 50 + var/base_bloodloss = 35 // the blood drained before a random variable is added. + invocation_self_message = "You prepare an incantation to trade some of your blood for mana." invocation = "Vy'Thr" - invocation_type = INVOCATION_WHISPER - var/channel_time = 10 SECONDS + channel_time = 10 SECONDS -/datum/action/cooldown/spell/lesser_splattercasting/before_cast(mob/living/cast_on) +/datum/action/cooldown/spell/meditate/lesser_splattercasting/before_cast(mob/living/cast_on) . = ..() - if (!cast_on.mana_pool) - cast_on.balloon_alert(cast_on, "no mana pool!") - return if (HAS_TRAIT(cast_on, TRAIT_NOBLOOD)) cast_on.balloon_alert(cast_on, "no blood to use!") return -/datum/action/cooldown/spell/lesser_splattercasting/cast(mob/living/cast_on) +/datum/action/cooldown/spell/meditate/lesser_splattercasting/cast(mob/living/cast_on) . = ..() - to_chat(cast_on, span_alert("You prepare an incantation to trade some of your blood for mana.")) // TODO - if(!do_after(cast_on, channel_time)) // don't want this casted mid combat - return . | SPELL_CANCEL_CAST - var/randy_value = rand(0,25) var/blood_drain = base_bloodloss + randy_value - var/mana_to_gain = randy_value + base_mana_recharge cast_on.blood_volume -= blood_drain - cast_on.mana_pool.adjust_mana(mana_to_gain) + var/turf/location = get_turf(cast_on) + cast_on.add_splatter_floor(location) From 0939796f9d38c76edd1a842e5388a3818c220ed7 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 15 Nov 2025 17:18:14 -0500 Subject: [PATCH 24/58] artificial volite, compile fixes --- maplestation.dme | 2 ++ .../items/devices/scanners/mana_lens.dm | 17 ---------- .../modules/magic/story_spells/mana_charge.dm | 5 +-- .../modules/research/designs/magic_designs.dm | 31 +++++++++++++++++++ .../modules/research/techweb/magic_nodes.dm | 22 +++++++++++++ 5 files changed, 58 insertions(+), 19 deletions(-) create mode 100644 maplestation_modules/code/modules/research/designs/magic_designs.dm create mode 100644 maplestation_modules/code/modules/research/techweb/magic_nodes.dm diff --git a/maplestation.dme b/maplestation.dme index a804af252844..4c8df5d6786c 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6745,12 +6745,14 @@ #include "maplestation_modules\code\modules\reagents\reagent_containers\cups\glassbottle.dm" #include "maplestation_modules\code\modules\recycling\holder.dm" #include "maplestation_modules\code\modules\research\designs\autolathe_designs.dm" +#include "maplestation_modules\code\modules\research\designs\magic_designs.dm" #include "maplestation_modules\code\modules\research\designs\mecha_designs.dm" #include "maplestation_modules\code\modules\research\designs\medical_designs.dm" #include "maplestation_modules\code\modules\research\designs\wiremod_designs.dm" #include "maplestation_modules\code\modules\research\machinery\experimentor.dm" #include "maplestation_modules\code\modules\research\techweb\_research.dm" #include "maplestation_modules\code\modules\research\techweb\all_nodes.dm" +#include "maplestation_modules\code\modules\research\techweb\magic_nodes.dm" #include "maplestation_modules\code\modules\research\xenobiology\cores.dm" #include "maplestation_modules\code\modules\research\xenobiology\potions.dm" #include "maplestation_modules\code\modules\robotic_limb_detach\robot_limb_detach_quirk.dm" diff --git a/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm b/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm index 8c3b3d7a5ddc..7f427caff838 100644 --- a/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm +++ b/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm @@ -20,20 +20,3 @@ balloon_alert(user, "object has no mana pool!") return balloon_alert(user, "mana amount: [interacting_with.mana_pool.amount]") - -/datum/design/proto_mana_lens - name = "Prototype Mana Lens" - desc = "The first prototype of a device capable of reading the prescence of mana." - id = "mana_lens" - build_type = PROTOLATHE - materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/gold = SMALL_MATERIAL_AMOUNT) - build_path = /obj/item/mana_lens - -/datum/techweb_node/mana_base - id = "mana_base" - starting_node = TRUE - display_name = "Early Magical Tech" - description = "The first bits of technology surronding magic." - design_ids = list( - "mana_lens", // more will be added to this - ) diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index 350e25fb6010..33e1f3ddd847 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -40,7 +40,7 @@ desc = "Drain some of your own blood to recover mana. This does not prevent you from bleeding out." button_icon = 'icons/effects/bleed.dmi' button_icon_state = "bleed10" - sound = 'sound/weapon/slice.ogg' + sound = 'sound/weapons/slice.ogg' cooldown_time = 2 MINUTES // shorter as its not from no where base_mana_recharge = 50 @@ -58,7 +58,8 @@ /datum/action/cooldown/spell/meditate/lesser_splattercasting/cast(mob/living/cast_on) . = ..() - var/blood_drain = base_bloodloss + randy_value + var/random_bloodloss_value = rand(random_value_floor, random_value_ceiling) + var/blood_drain = base_bloodloss + random_bloodloss_value cast_on.blood_volume -= blood_drain var/turf/location = get_turf(cast_on) cast_on.add_splatter_floor(location) diff --git a/maplestation_modules/code/modules/research/designs/magic_designs.dm b/maplestation_modules/code/modules/research/designs/magic_designs.dm new file mode 100644 index 000000000000..acf4f6fa9ccd --- /dev/null +++ b/maplestation_modules/code/modules/research/designs/magic_designs.dm @@ -0,0 +1,31 @@ +/datum/design/proto_mana_lens + name = "Prototype Mana Lens" + desc = "The first prototype of a device capable of reading the prescence of mana." + id = "mana_lens" + build_type = PROTOLATHE + materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/gold = SMALL_MATERIAL_AMOUNT) + build_path = /obj/item/mana_lens + +/datum/design/artificial_volite_large + name = "Artificial Volite Gem" + desc = "Produce a volite gem through non-magical manufacturing. Far less efficient than the magical way, of course." + id = "artificial_volite_large" + build_type = PROTOLATHE + materials = list(/datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 2, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 2, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 2) + build_path = /obj/item/mana_battery/mana_crystal/standard + +/datum/design/artificial_volite_small + name = "Small Artificial Volite Gem" + desc = "Produce a miniaturized volite gem through non-magical manufacturing. Far less efficient than the magical way, of course." + id = "artificial_volite_small" + build_type = PROTOLATHE + materials = list(/datum/material/bluespace = SMALL_MATERIAL_AMOUNT, /datum/material/uranium = SMALL_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT) + build_path = /obj/item/mana_battery/mana_crystal/small + +/datum/design/techie_magic_wand + name = "Arcane Field Modulator" + desc = "An overengineered device produced and researched on board to manipulate and move residual mana within objects." + id = "techie_magic_wand" + build_type = PROTOLATHE + materials = list(/datum/material/silver = SMALL_MATERIAL_AMOUNT, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 2.5) + build_path = /obj/item/magic_wand/techie diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm new file mode 100644 index 000000000000..a749735ac705 --- /dev/null +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -0,0 +1,22 @@ +/datum/techweb_node/mana_base + id = "mana_base" + starting_node = TRUE + display_name = "Early Magical Tech" + description = "The first bits of technology surronding magic." + design_ids = list( + "mana_lens", + "techie_magic_wand", + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS) + +/datum/techweb_node/artificial_volite + id = "artificial_volite" + starting_node = TRUE + display_name = "Artificial Volite Synthesis" + description = "Produce volite gemstones through an admittedly inefficient process." + prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY, "mana_base") + design_ids = list( + "artificial_volite_large", + "artificial_volite_small", + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) From fa15d7132685733f3e53d278861fbf4b7a1ffdbf Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 15 Nov 2025 17:23:42 -0500 Subject: [PATCH 25/58] department locks the artificial volite recipes --- .../code/modules/research/designs/magic_designs.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maplestation_modules/code/modules/research/designs/magic_designs.dm b/maplestation_modules/code/modules/research/designs/magic_designs.dm index acf4f6fa9ccd..1347815429be 100644 --- a/maplestation_modules/code/modules/research/designs/magic_designs.dm +++ b/maplestation_modules/code/modules/research/designs/magic_designs.dm @@ -13,6 +13,7 @@ build_type = PROTOLATHE materials = list(/datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 2, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 2, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 2) build_path = /obj/item/mana_battery/mana_crystal/standard + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING // because this is meant to be inefficient (and uses bluespace crystals) this should be locked to the two departments that generally manage these /datum/design/artificial_volite_small name = "Small Artificial Volite Gem" @@ -21,6 +22,7 @@ build_type = PROTOLATHE materials = list(/datum/material/bluespace = SMALL_MATERIAL_AMOUNT, /datum/material/uranium = SMALL_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT) build_path = /obj/item/mana_battery/mana_crystal/small + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING /datum/design/techie_magic_wand name = "Arcane Field Modulator" From 547299f0760c1b79e59e84dac041c22275066f90 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 18 Nov 2025 18:07:11 -0500 Subject: [PATCH 26/58] adds the techie wand sprite to the game --- .../code/modules/magic/mana/magic_wands.dm | 2 +- maplestation_modules/icons/obj/magic/wands.dmi | Bin 463 -> 601 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index b4b26736129f..5d3cdc118ad4 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -47,7 +47,7 @@ name = "Arcane Field Modulator" desc = "An overengineered device produced and researched on board to manipulate and move residual mana within objects." icon = 'maplestation_modules/icons/obj/magic/wands.dmi' - icon_state = "makeshift" + icon_state = "techie" w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets /obj/item/magic_wand/wooden diff --git a/maplestation_modules/icons/obj/magic/wands.dmi b/maplestation_modules/icons/obj/magic/wands.dmi index d9c70e9a40bc0b1c4daea46ad922bf6273f1d7cc..0c8d3e417e9ec56449078eedfef8d9099aa8fd6a 100644 GIT binary patch delta 520 zcmV+j0{8vT1K9+S7k@wq0{{R3owtGP00015P)t-sz`(#{X>W~^ltDvDBqk}QjtJ4S z3ijGOFAP;hM@UK@aIJv!D=RG=9323>l>&x=P*G7J|Eyz9s&;*Vz`($?S^)q5b59!p z|Fr;kJ`$f@C>|LVJti7hF%G4*IJN))00DGTPE!Ct=GbNc00IDik$p&isU$TyBQsTr zi!&v&s2C_<$iCT6D=XJn?85L8*7pP!PNhfA5Vf~%hk*r5RI&@ut2 zf4Q~*00AONL_t(oh3(bdj)Nc&1>iw`r0BL?4LH#9{;#>1UOQ|&=|z*yE%^?k;7Iho zQVR5gQW|Su7@&Z?1!Ew8Z;S>4nkS?IB|pD)khgXm#RT8+&Rs?;1%yfTG+QTnt%8@< z=gZGQ!0XhEl3#xFbkM-{w)@WE&-X)5zqkMS!)gJLr|W`wTBgu{f1+;*!ny;!9Wk%9 z6F-2iUsogD-@YHj18RDb?tjmRDJ+m*Fz-F)wbowpMz76F3Cf6j^TX(lr_Sm=-H{*6 zE8$xwD@M?#4e}dfK9>jRpP;V@XVB-8p#Hg}jNE{>e?}U}g~9z9+`oRZ&!Ddb^*Mr` zb3Grxg%jdy^9=c1BjDpR*OqYF6Q`DdOu)$L0Zq^?ZrB9>@cIM%qZ6FSM4Bi70000< KMNUMnLSTYKOY*}2 delta 381 zcmV-@0fPS71kVGI7iJ&`0{{R3l|zoU0000#P)t-sz`($?S^)q5b59!p|Fr;kJ`$f@ zC>|LVrj7{FvkE;X8ur>eSTPPoM@TCxEgT#jP*G7qLrHdhfFvdn;F006s5L_t(YiRIKm62l+}1yEEl8ZoWf`=7P+0R48# zbXB(cKFlOS^w$-F)5qlUiG5!3fsRYv`V;Ze8cvX`uzl^VfD62T@pP4nyyS@HC%XC# z1#pf6{{Zs@y!972z;)kv-t;#Q>gBinq1PY#?(!9T+4<6-*Szs#RP+EeOTd241wOxd z76k!gKE`@~%$cLdt9f>L(ctjm6t#q}J#n-IumRVY=FtQk541toz@Ab_c!MwOKd9yO bu6hCvM+o@QzZ_)@00000NkvXXu0mjfB}1&w From 10b2757050385869a4a0b955182f3ebe324538bf Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 22 Nov 2025 13:55:23 -0500 Subject: [PATCH 27/58] adds psionic quirk, fixes a runtime --- maplestation.dme | 2 + maplestation_modules/code/__DEFINES/traits.dm | 2 + .../code/datums/quirks/_quirk.dm | 15 +++++++ .../code/datums/quirks/good.dm | 14 +++++++ .../items/spellbook_item_cantrips.dm | 4 +- .../code/modules/magic/mana/magic_wands.dm | 37 +++++++++++++++++- .../modules/magic/story_spells/mage_hand.dm | 11 ++++++ .../modules/magic/story_spells/mana_tap.dm | 15 +++++++ .../modules/magic/story_spells/telepathy.dm | 11 ++++++ .../icons/mob/actions/actions_cantrips.dmi | Bin 6275 -> 6819 bytes 10 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 maplestation_modules/code/datums/quirks/_quirk.dm create mode 100644 maplestation_modules/code/modules/magic/story_spells/mana_tap.dm diff --git a/maplestation.dme b/maplestation.dme index 4c8df5d6786c..b04cf5e9c1a9 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6356,6 +6356,7 @@ #include "maplestation_modules\code\datums\pain\pain_status_effects\pain_limp.dm" #include "maplestation_modules\code\datums\pain\pain_status_effects\sharp_pain.dm" #include "maplestation_modules\code\datums\pain\pain_status_effects\temp_pack.dm" +#include "maplestation_modules\code\datums\quirks\_quirk.dm" #include "maplestation_modules\code\datums\quirks\good.dm" #include "maplestation_modules\code\datums\quirks\negative.dm" #include "maplestation_modules\code\datums\quirks\neutral.dm" @@ -6649,6 +6650,7 @@ #include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_charge.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_sense.dm" +#include "maplestation_modules\code\modules\magic\story_spells\mana_tap.dm" #include "maplestation_modules\code\modules\magic\story_spells\sense_equilibrium.dm" #include "maplestation_modules\code\modules\magic\story_spells\shock_touch.dm" #include "maplestation_modules\code\modules\magic\story_spells\soothe.dm" diff --git a/maplestation_modules/code/__DEFINES/traits.dm b/maplestation_modules/code/__DEFINES/traits.dm index 32514177eae2..a48088faaf17 100644 --- a/maplestation_modules/code/__DEFINES/traits.dm +++ b/maplestation_modules/code/__DEFINES/traits.dm @@ -4,3 +4,5 @@ #define TRAIT_FEATHERED "feathers" /// Gives positive mood on drinking anything caffeinated, kinda generic so people can like coffee, tea, energy drinks, whatever. #define TRAIT_CAFFEINE_LOVER "caffeine_lover" +/// First of a potential series, this is the trait a mob with the psionic quirk will get. generally affects the costs/cooldowns of specific spells +#define TRAIT_FULL_PSIONIC "full_psionic" diff --git a/maplestation_modules/code/datums/quirks/_quirk.dm b/maplestation_modules/code/datums/quirks/_quirk.dm new file mode 100644 index 000000000000..5d5ea579b489 --- /dev/null +++ b/maplestation_modules/code/datums/quirks/_quirk.dm @@ -0,0 +1,15 @@ +// somehow i stumbled accross the first case of needing to add a power via quirks. Funny +// also potentially overkill but honestly i fully anticipate this having more cases + +/datum/quirk/power_granting + var/datum/action/action_type + abstract_parent_type = /datum/quirk/power_granting + +/datum/quirk/power_granting/add_unique(client/client_source) + var/datum/action/new_action = new action_type(src) + // failsafe incase the power granted is somehow already owned by the quirk holder + var/datum/action/duplicate_check = locate(action_type) in quirk_holder.actions + if(duplicate_check) + return + new_action.Grant(quirk_holder) + diff --git a/maplestation_modules/code/datums/quirks/good.dm b/maplestation_modules/code/datums/quirks/good.dm index 1f21aac82ab8..bd6d6e7b5669 100644 --- a/maplestation_modules/code/datums/quirks/good.dm +++ b/maplestation_modules/code/datums/quirks/good.dm @@ -116,3 +116,17 @@ if(istype(human_holder)) human_holder.sprint_length_max /= 1.5 human_holder.sprint_length = human_holder.sprint_length_max + +/datum/quirk/power_granting/psionic + name = "Psionic" + desc = "You are able to manipulate and control the flow of mana with your mind." + icon = FA_ICON_BRAIN + value = 2 + mob_trait = TRAIT_FULL_PSIONIC + gain_text = span_notice("You feel as if you can see a form of light you've never seen before.") + lose_text = span_danger("You feel as if a part of your being was ripped from you.") + medical_record_text = "Patient displays provable extrasensory perception." + action_type = /datum/action/cooldown/spell/touch/mana_tap + + + diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index 07f28fedf570..a3c6f7640308 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -135,7 +135,7 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT /datum/spellbook_item/spell/mage_hand name = "Mage Hand" - description = "Magically manipulate an item from a distance." + description = "Magically manipulate an item from a distance. Gains a small refund for psychics." lore = "The favorite of lazy magicians and tricksters alike, \ Mage Hand is a simple spell that allows the caster to manipulate an item from a distance. \ The spell is often used to retrieve items that are out of reach, play pranks on unsuspecting victims, \ @@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT /datum/spellbook_item/spell/sending name = "Sending" - description = "Its Telepathy, but with magic." + description = "Its Telepathy, but with magic. Gets a full refund when used by a psychic." lore = "Using your magical attunement (or other aptitudes) \ you can send a message to another creature within a short radius. " diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index 5d3cdc118ad4..5689b4fc8583 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -9,7 +9,6 @@ /obj/item/magic_wand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers) var/datum/mana_pool/target_mana_pool = interacting_with.mana_pool var/datum/mana_pool/user_pool = user.mana_pool - var/already_transferring = (user in target_mana_pool.transferring_to) if(!target_mana_pool) return // no response for this failing, as else it would proc on ~70% of things in the codebase @@ -20,6 +19,7 @@ balloon_alert(user, "can't take from this!") return + var/already_transferring = (user in target_mana_pool.transferring_to) if (already_transferring) balloon_alert(user, "canceled draw") target_mana_pool.stop_transfer(user_pool) @@ -55,4 +55,37 @@ desc = "A traditional wood body and gold capped wand. Can still manipulate mana surprisingly well for its simplicity." icon = 'maplestation_modules/icons/obj/magic/wands.dmi' icon_state = "wooden" - w_class = WEIGHT_CLASS_SMALL // Can actually fit in pockets + w_class = WEIGHT_CLASS_SMALL + +// currently singleton, but decoupled for sanity's sake incase someone wants to do something similar +/obj/item/magic_wand/temporary + name = "Temporary Wand Basetype" + desc = "An ephemeral wand created by the power of Coderbus. Its life span is only brief, and its existence is fleeting. " + + item_flags = ABSTRACT|DROPDEL + /// Weakref to the action that created us + VAR_FINAL/datum/weakref/origin_ref + +/obj/item/magic_wand/temporary/Initialize(mapload, datum/action/cooldown/spell/touch/finger_flame/origin) + . = ..() + if(origin) + origin_ref = WEAKREF(origin) + item_flags &= ~DROPDEL + +/obj/item/magic_wand/temporary/proc/clear_up(mob/user, do_message = FALSE) + var/datum/action/cooldown/spell/touch/finger_flame/origin = origin_ref?.resolve() + if(!QDELETED(origin)) + origin.remove_hand(user, do_message) + return + + qdel(src) + +// given by the pseudo-spell gained from the psionic quirk +/obj/item/magic_wand/temporary/psionic + name = "Psychic Mana Tap" + desc = "An 'extension' of your mind, which allows you to freely draw mana from a capable source" + icon = 'icons/obj/weapons/hand.dmi' + lefthand_file = 'icons/mob/inhands/items/touchspell_lefthand.dmi' + righthand_file = 'icons/mob/inhands/items/touchspell_righthand.dmi' + icon_state = "star" + inhand_icon_state = "hivehand" diff --git a/maplestation_modules/code/modules/magic/story_spells/mage_hand.dm b/maplestation_modules/code/modules/magic/story_spells/mage_hand.dm index 3554df0936d2..bf5b876f3345 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mage_hand.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mage_hand.dm @@ -1,4 +1,5 @@ #define MAGE_HAND_MANA_COST 20 +#define MAGE_HAND_PSIONIC_MANA_REFUND 5 // more significant cost because its more powerful // Yeah, it's just a spell that gives you telekinesis for a short period, sue me /datum/action/cooldown/spell/apply_mutations/mage_hand @@ -70,4 +71,14 @@ /datum/mutation/human/telekinesis/mage_hand/get_visual_indicator() return +/datum/action/cooldown/spell/apply_mutations/mage_hand/after_cast(...) + . = ..() + // ditto, with the comments on this part in sending/telepathy's file + var/mob/living/carbon/psychic = owner + if(!psychic) + return + if(HAS_TRAIT(psychic, TRAIT_FULL_PSIONIC)) + psychic.safe_adjust_personal_mana(MAGE_HAND_PSIONIC_MANA_REFUND) + #undef MAGE_HAND_MANA_COST +#undef MAGE_HAND_PSIONIC_MANA_REFUND diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm b/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm new file mode 100644 index 000000000000..0cf8c31ab5c1 --- /dev/null +++ b/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm @@ -0,0 +1,15 @@ +/datum/action/cooldown/spell/touch/mana_tap + name = "Mana Tap" + desc = "Extend a psychic tap to allow you to manipulate mana without a simple object." + button_icon = 'maplestation_modules/icons/mob/actions/actions_cantrips.dmi' + button_icon_state = "spark_psi" + sound = null + check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_HANDS_BLOCKED + school = SCHOOL_CONJURATION + cooldown_time = 10 SECONDS + invocation_type = INVOCATION_NONE + spell_requirements = NONE + + hand_path = /obj/item/magic_wand/temporary/psionic + draw_message = null + drop_message = null diff --git a/maplestation_modules/code/modules/magic/story_spells/telepathy.dm b/maplestation_modules/code/modules/magic/story_spells/telepathy.dm index 4baa261fce9e..71c23643ec31 100644 --- a/maplestation_modules/code/modules/magic/story_spells/telepathy.dm +++ b/maplestation_modules/code/modules/magic/story_spells/telepathy.dm @@ -1,4 +1,5 @@ #define SENDING_MANA_COST 7 +#define SENDING_PSIONIC_MANA_REFUND 7 // partially for the gimmick, and because this was cheap to begin with /datum/action/cooldown/spell/list_target/telepathy/mana name = "Sending" @@ -14,4 +15,14 @@ mana_required = mana_cost, \ ) +/datum/action/cooldown/spell/list_target/telepathy/mana/after_cast(...) + . = ..() + var/mob/living/carbon/psychic = owner + if(!psychic) + return + // originally planned for it to replace the cost, but this is more reliable for reducing the cost (and owner is added after the component, so its null) + if(HAS_TRAIT(psychic, TRAIT_FULL_PSIONIC)) // if we have sufficient psionic quirks, we get a refund on the mana. feel free to update this if more varieties are added + psychic.safe_adjust_personal_mana(SENDING_PSIONIC_MANA_REFUND) + #undef SENDING_MANA_COST +#undef SENDING_PSIONIC_MANA_REFUND diff --git a/maplestation_modules/icons/mob/actions/actions_cantrips.dmi b/maplestation_modules/icons/mob/actions/actions_cantrips.dmi index 54e955cce4118195e35fefc5e81ea03915cd10b5..673ed1b3cb560521a407e7f75400598664d7eeda 100644 GIT binary patch literal 6819 zcmbVRg!_plhNT}~b&HUA+>?eB<1_d~M8ucp+yjbkLPb`cX?;uuaDPU6guG75l#oSE zzGj)@2$V~;e5V7p;T;<85Zw2}aZ!0h4eLxdUgh9sW!5O35-S)DWA`?=q4pxsHlC+} zXdno@9ntGJ#rk8SU3!qW1aog$kIGLk^4xQZeqFTKZZmWq|F0oofax%n7EyAga@Wtt z06>$Wruf*vKmVX02toI)V5l3KW@nzpE*UcHd#m~+g1{+Rp-;gzYjh-rQfn7yir;B^ z`cRAwvFJ|7j+lH?o)X>TG?vxO$)qQe$s$r4C>5~p_tcltTk34=%&b-?1%G*SS zJ*T0D@&&m~=`Pw%)yu7(XzCkd&{q1_CnO^y}ZFd;(Iy{CI#JD zFEMASYO3M8Uv8EH%gshE=`A0=%+dQTT5MCCo2_-d&QiLgfok^QtBz3}2ovx>`#6Lj zlhFbmOymD?T5oGZ`e>a*zsLWz)^#Au2xVzhZPj<&Gws1!s{-P|j(Rh{Mg1ieIEc(g zZ09?wp$u|RDY8Fc@dweOUZ@gTG$Z z1;cmvi>{Mq8F3oV^Wb@UFie5D*C~o_@>W`kl5QOaipYm|wsYqI;J)%I7zms3A^CJ~ zEh(0F4geP$L5*p4P7831VqL!NOd0^7OH+GO1s+XJX6o=S-M2bT{gb#C1^^7QrFDg{ zmx3#PL?QR1Bp-hsAI;w^WgpMa;Q~G7ysSW2ubc~%qf}&u1O(z(L%!td9T~;~enuXR zE{iQJ3vstL4Mgu8O7f3hT$`6)t~zx0+cz>oI<^MNw}0rIG-J*5mtN)sQZKCpa&54u zW(oeViIM4hWYuu;wM?1}7P?NdmNgiNI7=*P-xi69xvl%@MYmt6U9u&`8^L)W{}PAw zqZt*@(|%1$tqy$qum=K;WbXpapw=I!d86%mH%;sMg`VAfzG(ffearZFhErH%6AO?z z9kqMVM1BeL&xIWDVJ^BpF985z(pn$MAa1eU{m=AGm8ac>>2PP|VSJe5 zc&tTv`)QJX3n;oVC&DT8vWU6gE9a6h;_iY;Su2h#GUI$IXs6_?Yz7_3ue{Zu?jxa> zJ8`k@_m+dZi0SDybYdmr0L0`G^Nkyf$KJ95t5rRo7N1XBiRC!|*@_PG0P@_v)_t8+ z>@R};R8A92Q7bIe`S!!G4;blZVR>2pWw)c5f=lV-e;H*sst9Ds)$m~nh5Gz6=7aOlut6%dK?BYvF)Pyv^V;?UiTq^ z-N}?7A_g*qJ<5^W{+pgxT(dOCXM&-eK-g#z7>m%k3&^yvLt=bs;-Vzl;1ij5XHtNvMybFYq=`PNH3n}+IkjR@H(lG z3=EcE6SarKsr%oI@$!Ky`Ek;dg=BZb2Th_i<#xw@nBpF78kk*NY=)OcG%F^*RTH1> zu-5{EhBr=&1^JY^DzJ$GY+$JJ(^dAXOG)O{nC+0^I}apgIYs;D{R*Sw5`T0pbFh|q z#IBn5Ttkt_UTSd;qImsOw}>G4*x52N0?BG05pwJ!T8k5WMIRf1M0+E3w)pYB*G{U7 zizzrn{Hr25cxg{_7Of(v^Hh@c3L7Bw?d2FA**vgSn6h-}w}`-H3v z*ixsos3-1q7{u9uZeLP-%3H@`~ zQtC8{%iL`c#aXMz67!bd;X@y49RRI{84u?mU&j~fgTX0h&QQUEjA)UW=(v=zWA6%d zC?%&ZMus%BVzye^sQ~N zW)m!#_|svTMramu;jM|e?IAUF>v#t`+uP;c4#9m-F{b+JIl}gtfI=?o<|JmLd<(u% zyzqc*E2*1#*Yo%c>-SClH3qKAfjNFSC?DQXq`!EW0j}O@RW8k>o-JFxA&BV}NUgjp z7v?&sZS;3=a4`RJW7r8)%aNAZ+0-P;A4=~v={Qcs!Ne*cw%Dkmx1?f&D%Ic9+Bj^5 zYqW>f9bh3Ys8Ss~O6nn8tDQY|{9%sprs8Jt#mLrVVI8{Q-}7BB$*wO(FGkKM3w3%1 zx?l_mwXU}i79|GdqjP z?Er(EHKxV>-c0@F=wNo!)^p3kqyb~GE>}aUy=w$tSHtnPD8%Ea*9Kg>t!tu#-t-~IZ_!f8?F;`6nZ>RQz91>aomH^5^`>K26la}{|s&ae*oL&(kf zU*Dkya@gkj=RVdX`!)5W!$}v#@~Y2|&omimI&;SZ=X1%jpK?SHC_>4j?Ru1=y13il zN0+lQ{^xm`lwvNpyt3YBp7vAzp=$JpXXIl_gg`W>91NXS99Bsw``K;>!?*HHpCr#I zoK5M3K-U#XK^P+-Y;W;%-alxLCk``*2*qxg6PX|6 zaWLBNq5V3!MzqqeG=CYK!x}$7-!(znZ8V;POp!|e5AmNV8m+10`_OH_o>8IMnC%PcM=oh$qANgH<51Dx zT&M)W$HnstR3MYri|B8F@I&}>^2Mw&E|d>4>cmzJweUf# zn|a!FLNQU+;9m&AoRRE+GM1;8_e4=L=kR&4F~;lcIJK%~`=dy&&tG=&hgBJP&<-=y z6;_V!ze2%)>)jcrmGlh8Ufb3xA`lxUXnB8!;~A<)Q+kjrFyhLTo0`%XR7g2)=rfPp zrWGl?B-SjnB=Y}BjI@-%ys1CXxBvrD^|~Fmr4CV!G{TgwQk1Mb(19d+)=yzQoA*WPH& zR##IMzOS*s9kP;p2lAjWtioKS-XEI3qz2z>G+ca{!?HalTR(4^^6erBw<7-b-6A2p zCV|@TRezCq94YA)OyU9*qjHOLp=Py*)^LgAbbaidfAt3hXi@HS^aP&c zy#`bnGj?j)3zIccVF&VCJ8;D{Se{ajXS&&ZCb@89;v?Z2e2>`7EcRG87B3nj+Hp@R z7P?)45?GPT#Px-W3c{Wmf6}p%aId|{Dma#=T*f{>i|DGu4?x0Ba8DI9eC#}er6}cG zjxT2V*>tsg4{p>$a(H!5E*qJ%rZfO9*;_|F%H*GO!Lc zl;R@oM*}EcId0-B4pIC$X7KYqTqF4tL5qQ*JdS>=b4q)xFv&kc!J?f>%FR`0`8Qg+hpsXC-QZ!hR{jWWEp#Pw zp(J4Q2HO$zKg7(7*|pLqsmu6;7FA#KUK3I!bjz=6G+I@^7M{MCO5VK~icdcaHR#_9 z*l8;F?#9M_Ow8l~wovG&F)e>NpdET^0xf|`&~e~5!&VI$t;*mv>9JK+j7V)yas%Z`rHtzSa-}AKi>*nKzQel0XQ>-{?L1ZV%tJqREk)G z#i$WdpJp;u4#iO&rbnzv$<3iZnRj~jMputyzj@Tx3(~^(!%bGg-(i9IHkgx`m;jouCNy=ZFPm#?}_`}^kO*&JPh{Ev*+ zw^n-7+z^svWgdpRmWv3^tp*LY_d!lXDnG(}1P|7BzI%}fqoti_JYpi?FH|?i1SF)t z5&)O_7f$%+XB*R15ISQzew4BMq!>ib2U!eIyBNBTL00~NjZUe=M-7W#E(s49=&fFd&c)SEL`X6i``Y& z0={Zs&-A_n3Y^L31TV`Q%nj|1Xc&4fQ_!%-i~6bubR38(_DYYv=HyD{xZGSzN{Fs19Jn+=U-E)lJQxCZZHw4`ynBb3Q2~ zvi>j-(L{;Y)o}-z@^Ljb;jqB}BdRD_Ak|!R(Aa4(5goO-UejSMxqHAR97jq zn#LxCr_~LR?!8i4pM1BP$eoK!GER;XY|KEX>tLn7(~s{ogK*eydusQc;3>vqDZV&m zFBuRPuva}vXX3;oy&4Ufde#2SulR2db&Yu^Ey2o-^Xx(BS`+SO)_y&Y+PJ>wfqP*x zB@vK?fyu{fXp@y{4T+HoVnVMB@4;_*!ukN8F)$h>3uAc3lD-=xn&4}S?{l8dX-6$x z7C8v#$L?NR2}3m>zJmc+NT={FTr{t+5n#K2wz|t7Av3v5#kD%#> zJc2TIQ>`IZMz))SpsS9{d>20CE{@*w(oW@>pkA`mCX;+;y4b)CXwU9k)Z#QLn3*J< zFvrf{s%AEg^yk`1QU4Z+G$~3s%4EUY#y=gHhxMKw?^^9`3M}!yRY%!&?>e83FzcUy zu<5qbpJbcZyyU2e8nM+nB5(0_bK6p)~InUtBsa#2t{BYgTYWlHo{_BXUQf{moOFBVrofJJD(X2X9=xfhRN>Cil| z)JuOhv}t_g8EjmXdH1ZXbw#1TGQrusIhH10nf++!ZK}r3xt1baxhOS>q~Zz3X8O!= z3M-1cz8g`+7BnPar4C7B9A4A8ucxI7&UI0;SiAM0oEq+4`@!IqsX^N#e2Wgidr1#F z1QIbrwu%Qw@dy9}c95;&CRR;X)rmYKh#iVPzIXRWg2igY;wyJ{X1seW1Wn^VUgXBX z?O{y5e-l*rgm-<*==CU6esEaCMd7HTGn3)P1YHZy&JcN*tI^vFXJtp~Z}pm3CP{Tt z`ULV{F8Hn%VqtkcpSFdxc`z!-7MHiBjf5z|T1oBIVb}D61@(ckH9bB7Jl~c$2cBoA zV3lP5bS%Im`*!$##svg?Gh=wyBqf1llu%JFnegZSP(yO@skP#XO5n)!0Ux2D%D+UF z3TPpDYk7JqJqfhrr96tbtc+egF6ULyt!EU!4yI&cV=NTsga8s8zm(nL=^-XXUyDoJ zxxrl;&zl!fk>+zFGb)xP!TO(&X>_4==aK?eLs>|H^pme{-Tu?5Z)$#O4Hs%n@SEoy zsC~eb#EWOo$#@E^hY5#ooC2Dv%`{I%JElq-{JASm@plL**Cz|I|NK~#r9Rxn5|Mg1 z=^lYk#&ZxxY$xpAu$*BmTe(xURP|ljQg0aPA z)F>GD97TTphzk^bbrcd6jlO^Dln?2|f5nl3ksn|vWSnco1MN4cC!Y>RlW#Zy6<4bq zexjG+gh4dB5R+GEECW}6SdA0;6{bv6Cy+Omu;jsay%>3~GUN%Eo?}9bQB?TM*RDse zY$K(+Z29mZ9vT%J_cyZuu} zT(?zV47~dE^RZ(!?I!7~e=@pq2szD$f&g2ydu82t3X5LFok4w4UOnc#xEzKVrO zt@h+O;g{^}%oJCoO&BYe+o2Tk4za!XTN*{RT)mp1pBTx01Gy`qScc{Ht{pb4%RkO{ zB3xCJ6Vbrl>8c~aOd@tGYo2S76Ye>q<3QNG=O+n_g#6sSoG*brKjAsqp?9G`Ut@K? zZ_yc;h2`fVKYP9btPi=Rp(xW^W)r>XY4eRKJ4x)B3{G$aA5K zSicq5BAoj<sW{P*(U7#bhWd^=#S;hREW^h+ z`Fl8Xzndf$XOdYMV!wz|v@JM2wRY>WCvF(^BpGZ_BpOR@B*VHC1ii{b5FskOgSJv*kT~g_VuhM6ouhgb*poC(>dw ztk^2OI!Qn!v?e=v=c6u71H+SJ{ic-)Eq9}8z8^>5p3EKB8idU;> zs)=IOzA-s~Am4p_q`iXch!!)ic^t8LXg8(?ZyO}J!ohw%Oy)Y3u zAM)PKB>Y=otx~x;ch^XO6Lnu1UTHW`_YQl|Y6n@TZcN!`pnuf#G2q-c?QW-BGA{q7 zt6|FsX_xS*&C)9NXhQ_onlfGfNIw(ajsHKuM?iX|my>Hv$++dKsrx|*0 l3sGSaH(@#v&e-|~x}f>h@=Olr6!q5$P*c)Uta)M;@jt~v;qm|g literal 6275 zcmXwebzD@>7xq%Jl(eLDDc#*jHz>8T(j}nMu&_%gC0zoGfPi#JBl$&om2N4eBo?IE zT^8Q;{k`uWbI<+EoipdmnKRFMK6m0xjddtUnMnZv0EM2emN`zs{x#q|-1D1?0|F=h z3$?WN*K+Z5dgJlR-^14j00@S^o%lf-Ek;iK*AGLdUhnihyicT?+$DI@Dz)l0#e87% zs&g3nVazXwlCAVUQIb14k-?T4&U*b@t=&;(s#hyVa`}~%q=c-O@JFTjq==1Zav(m< zH2T+QUQE+RI58fRTXY7k2$sS4^j%W==aeyj6tK}6zEGQ3Wd#5*gzIUk zTL#0C1>yc6mx5u{AXf=JSH4^l5BvO_RyvxBj~euhE-s{G2?^zKf{Tya1x-N#VX41A zDkqLO{;H^{Ab$I{=TGPZ^`#Qi=jt(-Et69y6s6>}6z$rP0-3uB2z5LJh=W4d+ zLvdv_DQYbR_M|QUw7U^R&{#?r#O*_;^7&l7XeZhI0L&68L2WIitwpV7f(#9#C^75_ zClAf01$95S==vjQ-~kcf#us4+kc0DIPqNQ9)s7Lu4(!6R2N4yct#m}8Q^}HkfGx)y zu}=URPOw_UVKfPgT>>y!?rIdUirs8}81Yur{>~%fc6O#2jAcJW9c8R^cQeB*+=c** zs3uM)N1*qf1|YSQ3rL1Hno7yBda2#-l7XZE=B%4OGX&o`yuH~4+kTrW#3p+`Rz@c&4EAn5E5ag}3@&tgNWE@X~p~N&aC`I`%ylJqfbZHJ#8z3IXMsHdbdE3B%5t5B z=n+-EJ3aPLydfql7sHCX zr(@sm|B3p~%0zr@hBXwuaJo%-Cstc4p3if<1U0?)7ZGvPaWOM?jK1t~bJk1mALox+ z$q*`%UBGX6_uR1K()2bjU$wS_wOf9Jf>{I#>_Gg8_!jN)g?|P5X{$Ue-F@OVy0OmE zz~d?J*>?$Kz`f^^R#xK2g$|x8S^lenGK5-DyOf){Xqp`!WxsSbJ$8dHsPhA00>F@9>QyoikF;J8ulbT)C6Ag{>M;a15#{+&E zfNqP(As!kP>DeuU5er&6x*VYcEXnDhmjb7rt(vA;8q>t=BNz;r@B^}2xsG7gi{=rQ zV|f&!fKvqwx><=!yWCf>G6h9B3s7=_Uj!~Et$`3(s!X6(GlhwBL)!z)zc^@i#OHc2 zC?rLg5lYaxlZw;V7n_3dB{-r>^;Gt^VgMr0>)2^Z{#|Q}ZUc{1g<5S+do_tnZlHkdt%x+>% z_@W4BZJ=FjFogr~SlkA7ceR)YijSLBem0eSTdj|*>$(LE-^+;oZP#Wm*kPPpoEAVw zpPQS1RXp>Demctuk7!wg+)E#YbDida`s5u5aX%$f07b>ohyw%tX3WC!GFO>`ycGZ5 zHz0A;_?|O+(~OV(qK6(CYDxm_F0NXj4D0k=;tNr7a-SrMi{+T67jT>`n<H^y4Dr ziRuVZO^rCEee!j)mpRCLov%Zg{{#`?Z1Ya)wlRh%wZ_eQ895MZd?_w_OsU9`N{EJk zW8wxsT%W52rxqSv*AK}Cfdo5-hF+NzkOCu#I4kbkWKVgL{>5NP7V;(8HU{hG44P(+ z8qO4!VwI#L*QbWb6ot({JNCRfh;p7dfB&Xp!tD*)#*tmCUQqavMFN%UZh6|=9S>6* zhG+fj#d6FsXSp^$c+n$GtIc>ihXb>6{ep9<$$91W!VfuZ@m2Uub9N6XLoH~%(I~1< zpopg<6R#*F1x|-bb;1W|G@`#}uq9+k&G5&hlD^?1+)888qEq`M8Esc6HX1K-8Z0V8 z0Tq4mq#iiNeKrycdzxHP9d%~?a3l=(+68zfe~NFt{SSn>MPYQQ$v<+JS_@~o0r}oR zb_z1Ob*`mbc#TW=FI$gf7CZjt{RkWJ7P0}z{5+D0-5jimQ(N?xtD{7B!CSp?BVsp0 zpAaGfD5nmE<|6btIr2rUSJAe1`Hg{;ON|90TYfl`@FODU{2PcUM+#iWI1Hv_u450V zX4R`D`95%a-i19}Hqiy-t`vT3D}0W5t*Q3;s(csewh#fra}I@uu0;eQhi``79GXo0 zoT$ULr;nchPbo!_s@d&My`#B`rdNqrVyaC*^rb1hpm0cXM>jOl9H)0Ud;!Q^``^4I zS>Lz*pE2vlxy%3SG{_@gZn`U~5%&-fd8}S8Y(9=4yex4g3UuSM)2%cWQt7Yjwo znpKtQw~*yNs;UpW#?lHYK>t5_{|o1vBTlnp>BZJOl~f~42;LT3;7~`8Z0^__V}Oj^ zRaR}Sk*F(1r4gVGQHr7!CN6E37E;9grr}+8{fXT(Tt`Sa?Dl`j8PKKQ9=LMkQl-jt z85qSQJV_hZ(P(Zodz&#&mAYP)^(=;_JaujPcZcva!%I7(luDJOr`_80>T3kfOlC@I zjHoHy6tiQe;s7djLey(m7O}LMq76Q(D3~OGtsw_k%)J|mR}D0ar+j@us)0zHpzex{ z!X?9lPeY#4d+|VS{oDo!hbSy7zG&X}r)Q{8niv&Qu~zuw&rczdxN&kCqpG)9_7S45 z8>-e{jxM1Tc7$BIDg5x5j6P>}?S_!E9XJ#=Euq`So8J?6#cH2tzjq2d%1PpF z`KQp#w&!xdFZx6xFSVQPkX!SxeNQ29#lL{-o%6o^$!g#HJaM6MOY)C=SzqJfZXte+ z)vMMNaNkC}kACUQMxc1`Cl(m`%3J#*quXC=VgUQn8<~Qu)si?hBoUXxQziDIl9Cec z{7Z|$Tn|xxOjyPGVkx}3+9omFIZi>Xs;=yQLkhXLxcq-z$Cmv8<>wGUer+dmjHOd# zbQ^op@nU^5a2n;qe-@z{;8uuubxgunkdc|EPfrazP3iH=%y8;y4#o@2XC;jaAPZ#QX-*oND2}3;`UOH!9UUI)rdM_cRkmnT8|{?;?HdZi`hbwr<%YW1V;Z-)&3rIt^`vy9%M`)uvMLQsy6xN28-^(zKXfO zF+i*CyUz3$GKHSo8m7^>MF9j6w`;o2WYlro=jf*?M>%z&{=NR-1<|Vn32IH<7!)k# zYveyzUcDNSd=pfr>{k1uWzu|Hp&Cn0prd6j7&Xx9oZ;}}H#CN{ zk@cE(XMAewHU{O{%I^JS(%h9mb3a@t%Dvx};B10;q!G)QsPRpUV~xL)jblD4_2vw( z@ulio)du4iCGz;8aOu-Tji&d6t?!UAi?5aRyES;kuV}UyVrn3VZwF`;0_15{m@*mE zjyQCICu6(`U4S=~dep3xf)VPvY`IT95HDWLfUz#}@J7yeN|8X%K0Vi;5L|}4D*jZ|Iawi3TNgE zY0!N)b)Mf2X%K6=J~b;!iXSYQ3(^4>>K84&i+LIL9O*zl>_POscboA%^qkn85?Msl z`K{=RVEN;yBGwnyC4Lop542*_*Fm0A&rtVjCCfYiZ=>R{Z}w4FpwjADR&*vaVa>5% z9;D>0b86RSV^sdu_vg3eVJWn`MrC%};)2Vwk%hfiCkiHzZ3|8XKHz&#cJ$-w(#KBH%bT*7^dXN+MJ=dW9s?bMF#Hxq$)re*8{3CesFJ`8q z;;(V<_6IqCz4OzL8moMgs*hlZMc)KKl{mtS8XX=z#jj#5!UglSJlt&cu0eYjP;p9O zi)^F@>@G6yjOoLjoL}#B95EQ*3Pa>_m~rYW17RBAROTGvQp4uO*8mI9I*xG>4WMl;b(&2E)@Ho za=YLNZ7BgWFxA3SeB#{@l)8LwwM$le=jWCOzk9%Ya>dHENnMw$G}^Om^?Y^Qo{f3c zLdR+1A($o;VqZTa{G6~Mo(nI5<$Xi-{y*|t$p^Qb@ZdPsv(4gFmC9h?$>Y>G2C6Nq zo1zr2!l3B}->5Sg?@y>OaI*C+16#gOvh$JTzUiwR#KBWq$_Af^#jj?H4i6RgT$;<- zmsH8l{B#FhWjy(7a5-8V6^!@m5{!f>RwN3X##mA%-DrN+4_S6lV~tN|C+lo2B< z9Jm(B3xbq-d6KgR>2yD!s1G#$)cG4vjujeKVoOLxrO|cl{$gq_kqVbNGf02I_!Vtr z%p8)U&Y)y!Gw*}ew8&?QBtC*=BI>x%8TvC?_0J>3QD{`LX=kushe{PN{e<-+Q)!Tb zB2#+{JQ8d5_hzB`8WnjrBuR@g(GFjmef%~w+Il;nK@Q+QqKu?sQtWGgD8%ji=y`A2 zM-@+*8nTSZWTSXORs*i-onoh~6 zT0wKF1IDd#>N+^!kdEMEWy2_kw8k*dT%B*kgy+N{2GSC=Xm0gD%9)icN@;?88pUAG z!>bw5{FRGSfH=72%zO4Ev?Q>?(> za1^k~$dV|x+4i~4zS0+0V9d^GG!QmOHa#peS*{PNSa&vHm%0BLAqhT9o~&tEftpuM zQR(*q;&6LG!ng%Gp>)a@g|>&%*^4Q*Q!F@8L3CYZPA|7XcbHwI8aig(EmOp*sFQBO zd-Kxpe7cKG$9Pcti|mR1X?y&6gtvQHgTt*tSD(_Y?bS%|`jG@1l&bA%yUFPd|`m+y6c1RE}&@PAU8MH!QC}GXxOA= zf!H>(q$sUSfm#U*cMQLQ6h!;HOye_> z4ht6EsNTPeTkc=Fke6ZG2G!$cDwLR;%sERl3;S`F^_%3w*CC7ONi215^%kHXsk8qn zUM1{#JX6jy#}|JYH+>&EZUl?Al(FSav;rdSqe4mLrVWewvIV_Kuzv|Aj1Yq?iIbV= z*T2+_+R@4bg`DqWaRuFG6&;-&A}oYS$Yj)}eXI6(YZyUff1Lx(Ks@;Rt1QdSp-N=; zQ*UqPqg5qg-)>`M-s8G|f8fTN z>+hI~!ip1lA=_?DI56c~lAkmDY=7ZoiAB|5cYV#pb>P1&E3mo&A+^>DGoP;I)j}u8 zet7hwO7jruS1>fAYN(}s7xBf?Gc7^LA)ul&)Gd}W*<0gvThVme^4iM=*?z6%f~dSzRw9Vkk&Fc;n0$g)a`JMlAgx3&0dR z4|A!~oH&ZR^T}qdv>#KGZ0xpSn?PdH<9sH(+9hdR>*Ol2#5UQl3j)QC&SJu?h|?H+ zHU3J}Mb@$D8?s3aks4o8SlG}rGW?0a8o_@^f*MY6Oi-nZ@IhL_acRP~Co1Fi;*Dm& z-;M??(SC@UlDVW&4>K5Y*h|Mr7e>&XeovF>EfEo`-y(f+1vMT1ETWxTc&EY>lsIo4 zxqfV+)b}(8tREio@SB_KtIqOk8_a<^H^lR*-kyK)*3oO0{mt2MV%fjkK`fol;rW?o1Xg8-O@ZDRlu@-tvJ(^@!`>?jI9`SM(RSv6)oEWtRX(x^Ei?Yh!0 z3bev-ZLehtyq?JS{YVfsB#)fvCuX@YWW67>_Ufh48zYaU{I Date: Sat, 22 Nov 2025 20:26:02 -0500 Subject: [PATCH 28/58] changes psionic quirk's icon --- maplestation_modules/code/datums/quirks/good.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maplestation_modules/code/datums/quirks/good.dm b/maplestation_modules/code/datums/quirks/good.dm index bd6d6e7b5669..3fb311384200 100644 --- a/maplestation_modules/code/datums/quirks/good.dm +++ b/maplestation_modules/code/datums/quirks/good.dm @@ -120,7 +120,7 @@ /datum/quirk/power_granting/psionic name = "Psionic" desc = "You are able to manipulate and control the flow of mana with your mind." - icon = FA_ICON_BRAIN + icon = FA_ICON_HAND_SPOCK // because theres not really many better options, and this one is highly unlikely to be used elsewise value = 2 mob_trait = TRAIT_FULL_PSIONIC gain_text = span_notice("You feel as if you can see a form of light you've never seen before.") From 3ea2bbb4e289f0c32434a29aa170647e5f32117e Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 23 Nov 2025 13:21:28 -0500 Subject: [PATCH 29/58] adds light breaker --- maplestation.dme | 1 + .../items/spellbook_item_cantrips.dm | 9 +++++ .../magic/story_spells/light_breaker.dm | 36 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 maplestation_modules/code/modules/magic/story_spells/light_breaker.dm diff --git a/maplestation.dme b/maplestation.dme index b04cf5e9c1a9..06cfa19a5db7 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6647,6 +6647,7 @@ #include "maplestation_modules\code\modules\magic\story_spells\ice_blast.dm" #include "maplestation_modules\code\modules\magic\story_spells\ice_knife.dm" #include "maplestation_modules\code\modules\magic\story_spells\illusion.dm" +#include "maplestation_modules\code\modules\magic\story_spells\light_breaker.dm" #include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_charge.dm" #include "maplestation_modules\code\modules\magic\story_spells\mana_sense.dm" diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index a3c6f7640308..c8976f749826 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -221,3 +221,12 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT category = SPELLBOOK_CATEGORY_CANTRIPS our_action_typepath = /datum/action/cooldown/spell/eyes_of_night + +/datum/spellbook_item/spell/light_breaker + name = "Light Breaker" + description = "Fire a rapid projectile which shatters most lights.." + lore = "Favorite of dark mages, nightmares, and wizards suffering from a migrane, this spell propels a near imperceptible lance which shatters a targeted light source." + + category = SPELLBOOK_CATEGORY_CANTRIPS + + our_action_typepath = /datum/action/cooldown/spell/pointed/projectile/light_breaker diff --git a/maplestation_modules/code/modules/magic/story_spells/light_breaker.dm b/maplestation_modules/code/modules/magic/story_spells/light_breaker.dm new file mode 100644 index 000000000000..bf8a6e43ff45 --- /dev/null +++ b/maplestation_modules/code/modules/magic/story_spells/light_breaker.dm @@ -0,0 +1,36 @@ +#define LIGHT_BREAKER_ATTUNEMENT_DARK 0.3 +#define LIGHT_BREAKER_MANA_COST 25 + +/datum/action/cooldown/spell/pointed/projectile/light_breaker + name = "Light Breaker" + desc = "Propel forward a lance which shatters most lights it can hit." + button_icon = 'icons/mob/actions/actions_ecult.dmi' + button_icon_state = "mad_touch" + sound = 'sound/effects/parry.ogg' + + cooldown_time = 30 SECONDS + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + invocation = "Op'tc Br'k" + invocation_type = INVOCATION_SHOUT + school = SCHOOL_EVOCATION + var/mana_cost = LIGHT_BREAKER_MANA_COST + + active_msg = "You prepare to throw a light shattering lance." + deactive_msg = "You stop preparing to throw a light shattering lance." + + cast_range = 8 + projectile_type = /obj/projectile/energy/fisher + +/datum/action/cooldown/spell/pointed/projectile/light_breaker/New(Target, original) + . = ..() + + var/list/datum/attunement/attunements = GLOB.default_attunements.Copy() + attunements[MAGIC_ELEMENT_DARK] += LIGHT_BREAKER_ATTUNEMENT_DARK + + AddComponent(/datum/component/uses_mana/spell, \ + activate_check_failure_callback = CALLBACK(src, PROC_REF(spell_cannot_activate)), \ + get_user_callback = CALLBACK(src, PROC_REF(get_owner)), \ + mana_required = mana_cost, \ + attunements = attunements, \ + ) From 55c44a5d9f91b61ef4c03dd3711b5e2278ee2036 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 24 Nov 2025 00:47:23 -0500 Subject: [PATCH 30/58] mild fixes, makes volite powder work --- .../preferences/spellbook/items/spellbook_item_cantrips.dm | 2 +- .../code/modules/magic/mana/mana_chemicals.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index c8976f749826..650db554ee6d 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -224,7 +224,7 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT /datum/spellbook_item/spell/light_breaker name = "Light Breaker" - description = "Fire a rapid projectile which shatters most lights.." + description = "Fire a fast projectile which shatters most lights.." lore = "Favorite of dark mages, nightmares, and wizards suffering from a migrane, this spell propels a near imperceptible lance which shatters a targeted light source." category = SPELLBOOK_CATEGORY_CANTRIPS diff --git a/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm b/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm index dd82cf8c1cd9..e1c5f0df980e 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm @@ -3,7 +3,7 @@ . = ..() //Its a magic drink. it regens mana, if mildly if(drinker?.mana_pool) - drinker.safe_adjust_personal_mana(1.5) + drinker.safe_adjust_personal_mana(1.5) // magic number here and not a var on the base chem to keep it modular, and because it'll only be seen here /datum/reagent/consumable/ethanol/pod_tesla/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired) . = ..() @@ -75,10 +75,10 @@ color = "#4c1528" mana_adjust = -0.5 -/datum/reagent/volite_powder +/datum/reagent/quintessence/volite_powder name = "Volite Powder" description = "Pure Volite crystals which has been grinded up into a powder." taste_description = "lots of little sparks" ph = 8 color = "#22dcb5" - var/mana_adjust = 1 + mana_adjust = 1 From 098e810a0ffac301627bf5e3490785166f04d247 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 25 Nov 2025 16:34:31 -0500 Subject: [PATCH 31/58] occulory changes, fixes volite powder for real --- .../code/modules/magic/mana/mana_chemicals.dm | 2 +- .../mana/sources/altars/stellar_oculory.dm | 2 ++ .../magic/mana/sources/mana_batteries.dm | 8 ++++---- .../icons/obj/magic/altars.dmi | Bin 1233 -> 1413 bytes 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm b/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm index e1c5f0df980e..e966c573656b 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_chemicals.dm @@ -75,7 +75,7 @@ color = "#4c1528" mana_adjust = -0.5 -/datum/reagent/quintessence/volite_powder +/datum/reagent/medicine/quintessence/volite_powder name = "Volite Powder" description = "Pure Volite crystals which has been grinded up into a powder." taste_description = "lots of little sparks" diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 56a6b1b3a405..2ac752c8917d 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -29,10 +29,12 @@ /obj/machinery/power/magic_contraption/stellar/interact(mob/user) if(active) active = FALSE + icon_state = "stellar_inactive" to_chat(user, span_warning("deactivated")) // debug if(!active) to_chat(user, span_warning("activated")) //debug active = TRUE + icon_state = "stellar" /obj/machinery/power/magic_contraption/stellar/process(seconds_per_tick) if(!active) diff --git a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm index 630d1e229c49..3ca8f588b4bd 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/mana_batteries.dm @@ -94,7 +94,7 @@ name = "Stabilized Volite Crystal" desc = "A stabilized Volite Crystal, one of the few objects capable of stably storing mana without binding." icon_state = "standard" - grind_results = list(/datum/reagent/volite_powder = 10) + grind_results = list(/datum/reagent/medicine/quintessence/volite_powder = 10) /obj/item/mana_battery/mana_crystal/standard/get_initial_mana_pool_type() return /datum/mana_pool/mana_battery/mana_crystal/standard @@ -105,7 +105,7 @@ name = "Small Volite Crystal" desc = "A miniaturized Volite crystal, formed using the run-off of cutting larger ones. Able to hold mana still, although not as much as a proper formation." icon_state = "small" - grind_results = list(/datum/reagent/volite_powder = 5) + grind_results = list(/datum/reagent/medicine/quintessence/volite_powder = 5) w_class = WEIGHT_CLASS_SMALL /obj/item/mana_battery/mana_crystal/small/get_initial_mana_pool_type() @@ -115,7 +115,7 @@ name = "Cut Volite Crystal" desc = "A cut and shaped Volite Crystal, using a standardized square cut. It lacks power until it is slotted into a proper amulet." icon_state = "cut" - grind_results = list(/datum/reagent/volite_powder = 10) + grind_results = list(/datum/reagent/medicine/quintessence/volite_powder = 10) /obj/item/mana_battery/mana_crystal/cut/get_initial_mana_pool_type() return /datum/mana_pool/mana_battery/mana_crystal/small @@ -124,7 +124,7 @@ name = "Volitious Lignite" desc = "A natural source of Volite. It is formed not unlike coal, where magical plants has been compressed over millions of years by rock." icon_state = "lignite" - grind_results = list(/datum/reagent/volite_powder = 5, /datum/reagent/carbon = 5) + grind_results = list(/datum/reagent/medicine/quintessence/volite_powder = 5, /datum/reagent/carbon = 5) ///Just like coal, if the temperature of the object is over 300, then ignite /obj/item/mana_battery/mana_crystal/lignite/attackby(obj/item/W, mob/user, params) diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi index 03709e8823749263a0a0686d11534dd5877afed3..83f636e24a24fb8a44905fc460b3c20a22107190 100644 GIT binary patch delta 1362 zcmV-Y1+Dtg355$KiBL{Q4GJ0x0000DNk~Le0001B0000$2m=5B0MhD$JOBUya*-uQ zf55=NB{@a3S^z^^WD*!B|Fr=B|8q|p03iRYsQ=;$3mOX)C?X~~GB!>Cyp>K%Xgip# zcK`qY0d!JMQvg8b*k%9#0GWDJSad{Xb7OL8aCB*JZU6vyoQ;sp3WG2ZgwM%S1ihF3 zU3)2tc&M)swz^FgOf1>0efpVM=qYo3=C6t<^IorYV|>Iq&vby=f4i z;dIo>BRMZCuz+BWg_|O#LaTuiXFh24NDy$%Un_v4p5+yu_704j{<3NV^q%6j&4S|y z$x?(~X#TtK%PURYRm&S6F&a_9={qi;000CWNklP3?=RS7@IgMBWV4q1+nD(%tNH7HH0*q#Jxf|`QU@34{e-QI@3wH$t z4+RR2Iq$*F-Gd$PL4KtCRK&Cg#$fq0R-8fw`j{ePdY;>3Y6W_}MZpf->_DI(HRn`2 za(>`bnrcC2f$S*wf%(}fTGmov>zHc8{=@!M;F0-Opbeji{i)E8MHVW^jX`e(HQ(@U zi;N*oSb?kI7p`D?Oy?C4e@kyM{hI1+rm?9-VCl}_xPF>mVJr(2lw?TF7MpFRfwa_u ziVT_UzTOEM$f{6*Hn4+Be@II!&<1vJ=?_^IC^(m7(A24N;+JR2FBKUyb*h5+)y07? z1+L_LBtx3d4t~VoQ43CF$cov)j~G0K3dm3{TSOyADz*|>maGe=+Uf8}4l2+#`A65wmy1z+yvOMXd-x~3@tCgm%+uXt7scYu4q?P$Yu zZwcDLYpq%Wv`T*x;klPD`G`bHv~}GI74bolVw>Mk+dM!(YZeiA06mBV9~804Z{Mif zCihk=i6A;F=mfn#H`(Uklj63{y`^dZWZ$Vyp>XT5kFr+lfBg2%f46lWB9OHlx^5Uz zbeA-u*7=?1|9xNQeu1O~4~%EUKuwWqo!|8y+}C-SKoGx0kwI()l;7zT-8Z?nI_dxc z+PZ1#mI3HNx6SXUZSJd~Qv?{tN8NmVHT7d0381 zUct|KfM5ina{>4=_v0-1IrrCq{~hRyY~RNRP>0Ywq(@_q8VP|5KRX@p;M1&Z;>TN zeFu3JV$w6euDlIRLzsG&oC6PGwIU0JK^F|Fr=B|8xF*a&7fFDZ*Bkpc$`yKaB_9`^iy#0_2eo`Eh^5; z&r`5fFwryM;w;ZhDainGjE%TBGg33te=|xToZ^zil2jm5DLp?gwMdDJGbOXA7|1u| z;!G<_%uR)`;i_^I(=(HcOGm)6M3;s;$;n_YD_d=C$=0+(>*Fp z*@%RMgS%{p%64odpYlIazXuq`0_U@x-vcrtf%6>AQDTGw=Q&!S#0Z5_^BR^D38mbx zG_PSfkx&J|9>G#}a=R@d>?0rne^BUmNO-tQCLl+g^G{Q;03xUR1>Vp3=c!mg4}}M| zSV68o0Y2rj1_hEN1E4I3*GKQS@fCw*{|0&C`Dm+lCAX`C;*SueX3Q5KUj+&pB zfM;b3>90|?k>;i);92P$pYui6f;rzoO+v0)sM|;rc`ZOgLg800J3$jg;{g%a;F62H z_J9a%aLGl{C~&GtkknKqf92~F-G6OJkknKa<(pRl4kYB|Z15112LX;G6xD3-5R*p_ zkWj}L5P}&Afmn%FjX_#OM4hG(kMf2f|c`ARh=*9iu!1 z5QjK^3h%#yIL7fP&&1RQrB8RaK}>B>`aV7z57UA1W%^&0F@F)Ze`aGWAHJD?v!=DS zH5hy^|MrG73>pMC{C@)R}c?4 zcz!g)0P+H~a^(pw|0RYS z$%B?!uss0&ckX&ie+{&20Bfx4F8uzVm(E$5Spo3#&Rt{=F3z#I8W@HPeTB;~L_k{i~&G#SJZqhsMfdDN4$h+mh0HF(k z4*6j*uyJ_SIX4LdE}#Y<;ST_s9eR`sGVbs8@VABM@j~pHb8^IGzalR^;BSExIj?%Z u^uVhYfIh&=JQF Date: Tue, 25 Nov 2025 17:19:19 -0500 Subject: [PATCH 32/58] makes the altars craftable, some maintenance on the designs --- maplestation.dme | 1 + maplestation_modules/code/__DEFINES/colors.dm | 4 ++++ .../code/__DEFINES/research/techweb_nodes.dm | 3 +++ .../datums/components/crafting/recipes.dm | 10 +++++++++ .../mana/sources/altars/stellar_oculory.dm | 21 +++++++++++++++++++ .../modules/research/techweb/magic_nodes.dm | 21 ++++++++++++++----- 6 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 maplestation_modules/code/__DEFINES/research/techweb_nodes.dm diff --git a/maplestation.dme b/maplestation.dme index 06cfa19a5db7..d4281278b7a5 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6308,6 +6308,7 @@ #include "maplestation_modules\code\__DEFINES\magic\spellbook\spellbook_categories.dm" #include "maplestation_modules\code\__DEFINES\magic\spellbook\spellbook_customization_interfaces.dm" #include "maplestation_modules\code\__DEFINES\magic\spellbook\spellbook_entry_types.dm" +#include "maplestation_modules\code\__DEFINES\research\techweb_nodes.dm" #include "maplestation_modules\code\__DEFINES\subsystems\_module_subsystem_defines.dm" #include "maplestation_modules\code\__DEFINES\subsystems\_module_subsystem_priorities.dm" #include "maplestation_modules\code\__HELPERS\magic_helpers.dm" diff --git a/maplestation_modules/code/__DEFINES/colors.dm b/maplestation_modules/code/__DEFINES/colors.dm index 0e9c2454dfbd..ab6e3adf9c3d 100644 --- a/maplestation_modules/code/__DEFINES/colors.dm +++ b/maplestation_modules/code/__DEFINES/colors.dm @@ -9,3 +9,7 @@ // unused on the downstream so it was killed over a year ago, now back with a vengeance! #define RUNE_COLOR_EMP "#4D94FF" + +// colors used for volite and magic related stuff +#define COLOR_VOLITE_TEAL "#7affd1" +#define COLOR_CIRUIT_MAGIC "#028681" diff --git a/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm new file mode 100644 index 000000000000..a43cba908c0e --- /dev/null +++ b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm @@ -0,0 +1,3 @@ +#define TECHWEB_NODE_ARTIFICIAL_VOLITE "artificial_volite" +#define TECHWEB_NODE_MANA_BASE "mana_base" +#define TECHWEB_NODE_STELLAR_OCCULORY "stellar_occulory_unlock" diff --git a/maplestation_modules/code/datums/components/crafting/recipes.dm b/maplestation_modules/code/datums/components/crafting/recipes.dm index 9416ceba2ad7..aa1d38217a7e 100644 --- a/maplestation_modules/code/datums/components/crafting/recipes.dm +++ b/maplestation_modules/code/datums/components/crafting/recipes.dm @@ -68,3 +68,13 @@ /obj/item/stack/sheet/mineral/wood = 2, /obj/item/stack/sheet/mineral/gold = 1, ) + +/datum/crafting_recipe/nature_shrine + name = "The Stump Which Watches" + time = 30 SECONDS + reqs = list( + /obj/item/stack/sheet/mineral/wood = 10, + /obj/item/mana_battery/mana_crystal/standard = 1, + ) + result = /obj/structure/magic_altar/nature + category = CAT_MISC diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 2ac752c8917d..2e4ecfca43a9 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -12,6 +12,7 @@ desc = "an advanced machine which focuses starlight into mana for use." icon_state = "stellar" base_icon_state = "stellar" + circuit = /obj/item/circuitboard/machine/stellar_oculory var/active = FALSE var/pulse_delay = 20 SECONDS @@ -66,3 +67,23 @@ mana_pool.amount += pulse_value last_pulse = world.time +/obj/item/circuitboard/machine/stellar_oculory + name = "\improper Stellar Occulory (Machine Board)" + greyscale_colors = CIRUIT_COLOR_MAGIC + build_path = /obj/machinery/power/magic_contraption/stellar + req_components = list( + /datum/stock_part/capacitor/tier3 = 3, + /datum/stock_part/servo/tier3 = 1, + /obj/item/stack/sheet/mineral/gold = 2, + /obj/item/mana_battery/mana_crystal/standard = 1, + ) + +/datum/design/board/stellar_oculory + name = "Stellar Occulory" + desc = "The circuit board for a stellar occulory." + id = "stellar_oculory" + build_path = /obj/item/circuitboard/machine/stellar_oculory + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_RESEARCH + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING | DEPARTMENT_BITFLAG_SCIENCE diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm index a749735ac705..18434df004a5 100644 --- a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -1,6 +1,6 @@ /datum/techweb_node/mana_base - id = "mana_base" - starting_node = TRUE + id = TECHWEB_NODE_MANA_BASE + starting_node = FALSE display_name = "Early Magical Tech" description = "The first bits of technology surronding magic." design_ids = list( @@ -10,13 +10,24 @@ research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS) /datum/techweb_node/artificial_volite - id = "artificial_volite" - starting_node = TRUE + id = TECHWEB_NODE_ARTIFICIAL_VOLITE + starting_node = FALSE display_name = "Artificial Volite Synthesis" description = "Produce volite gemstones through an admittedly inefficient process." - prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY, "mana_base") + prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY, TECHWEB_NODE_MANA_BASE) design_ids = list( "artificial_volite_large", "artificial_volite_small", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) + +/datum/techweb_node/stellar_oculory + id = TECHWEB_NODE_STELLAR_OCCULORY + starting_node = FALSE + display_name = "Starlight-Mana Conversion" + description = "Convert trace arcane essence from nearby starlight into usable mana" + prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_PARTS_ADV) + design_ids = list( + "stellar_oculory", + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) From 0c6cbdde074bcd8882d1516a84d95d3f513eba1e Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 25 Nov 2025 17:22:46 -0500 Subject: [PATCH 33/58] typo --- maplestation_modules/code/__DEFINES/colors.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maplestation_modules/code/__DEFINES/colors.dm b/maplestation_modules/code/__DEFINES/colors.dm index ab6e3adf9c3d..cc79a7064340 100644 --- a/maplestation_modules/code/__DEFINES/colors.dm +++ b/maplestation_modules/code/__DEFINES/colors.dm @@ -12,4 +12,4 @@ // colors used for volite and magic related stuff #define COLOR_VOLITE_TEAL "#7affd1" -#define COLOR_CIRUIT_MAGIC "#028681" +#define CIRCUIT_COLOR_MAGIC "#028681" From 304bb3ca601495217761ca18752742a3a5749be8 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 25 Nov 2025 19:27:35 -0500 Subject: [PATCH 34/58] another typo yipee --- .../code/modules/magic/mana/sources/altars/stellar_oculory.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 2e4ecfca43a9..09cd63acb5a2 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -69,7 +69,7 @@ /obj/item/circuitboard/machine/stellar_oculory name = "\improper Stellar Occulory (Machine Board)" - greyscale_colors = CIRUIT_COLOR_MAGIC + greyscale_colors = CIRCUIT_COLOR_MAGIC build_path = /obj/machinery/power/magic_contraption/stellar req_components = list( /datum/stock_part/capacitor/tier3 = 3, From de7a9f094464d52fa0cbcceb2f2b189781c6577f Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Tue, 25 Nov 2025 23:54:56 -0500 Subject: [PATCH 35/58] mild oculory fixes & touchups --- maplestation_modules/code/__DEFINES/colors.dm | 3 +-- .../code/__DEFINES/research/techweb_nodes.dm | 2 +- .../mana/sources/altars/stellar_oculory.dm | 23 +++++-------------- .../modules/research/designs/magic_designs.dm | 10 ++++++++ .../modules/research/techweb/magic_nodes.dm | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/maplestation_modules/code/__DEFINES/colors.dm b/maplestation_modules/code/__DEFINES/colors.dm index cc79a7064340..cf6656cfcdf8 100644 --- a/maplestation_modules/code/__DEFINES/colors.dm +++ b/maplestation_modules/code/__DEFINES/colors.dm @@ -11,5 +11,4 @@ #define RUNE_COLOR_EMP "#4D94FF" // colors used for volite and magic related stuff -#define COLOR_VOLITE_TEAL "#7affd1" -#define CIRCUIT_COLOR_MAGIC "#028681" +#define CIRCUIT_COLOR_MAGIC "#a8ffe2" diff --git a/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm index a43cba908c0e..e5210d0f663a 100644 --- a/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm +++ b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm @@ -1,3 +1,3 @@ #define TECHWEB_NODE_ARTIFICIAL_VOLITE "artificial_volite" #define TECHWEB_NODE_MANA_BASE "mana_base" -#define TECHWEB_NODE_STELLAR_OCCULORY "stellar_occulory_unlock" +#define TECHWEB_NODE_STELLAR_OCULORY "stellar_oculory_unlock" diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 09cd63acb5a2..124d606e5766 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -1,5 +1,5 @@ // Stellar oculory. A more technomagic themed altar, which generates mana from exposure to starlight, based heavily off of starlight regeneration. -#define COMSIG_STELLAR_OCCULORY_PULSE_MANA "occulory_pulse_mana" +#define COMSIG_STELLAR_OCULORY_PULSE_MANA "oculory_pulse_mana" /datum/mana_pool/magic_altar/stellar maximum_mana_capacity = 225 @@ -8,12 +8,12 @@ max_donation_rate_per_second = 4 /obj/machinery/power/magic_contraption/stellar - name = "stellar occulory" + name = "stellar oculory" desc = "an advanced machine which focuses starlight into mana for use." icon_state = "stellar" base_icon_state = "stellar" circuit = /obj/item/circuitboard/machine/stellar_oculory - var/active = FALSE + var/active = TRUE var/pulse_delay = 20 SECONDS var/last_pulse = 0 @@ -31,11 +31,11 @@ if(active) active = FALSE icon_state = "stellar_inactive" - to_chat(user, span_warning("deactivated")) // debug + return balloon_alert(user, "deactivated") if(!active) - to_chat(user, span_warning("activated")) //debug active = TRUE icon_state = "stellar" + return balloon_alert(user, "activated") /obj/machinery/power/magic_contraption/stellar/process(seconds_per_tick) if(!active) @@ -44,7 +44,6 @@ return if(mana_pool.maximum_mana_capacity == mana_pool.amount) return - // send signal activate check comsig here var/starlight_level = src.checkstarlight(starlight_check_range) pulse_mana(starlight_level) @@ -68,7 +67,7 @@ last_pulse = world.time /obj/item/circuitboard/machine/stellar_oculory - name = "\improper Stellar Occulory (Machine Board)" + name = "\improper Stellar oculory (Machine Board)" greyscale_colors = CIRCUIT_COLOR_MAGIC build_path = /obj/machinery/power/magic_contraption/stellar req_components = list( @@ -77,13 +76,3 @@ /obj/item/stack/sheet/mineral/gold = 2, /obj/item/mana_battery/mana_crystal/standard = 1, ) - -/datum/design/board/stellar_oculory - name = "Stellar Occulory" - desc = "The circuit board for a stellar occulory." - id = "stellar_oculory" - build_path = /obj/item/circuitboard/machine/stellar_oculory - category = list( - RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_RESEARCH - ) - departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING | DEPARTMENT_BITFLAG_SCIENCE diff --git a/maplestation_modules/code/modules/research/designs/magic_designs.dm b/maplestation_modules/code/modules/research/designs/magic_designs.dm index 1347815429be..a504ef67c5a6 100644 --- a/maplestation_modules/code/modules/research/designs/magic_designs.dm +++ b/maplestation_modules/code/modules/research/designs/magic_designs.dm @@ -31,3 +31,13 @@ build_type = PROTOLATHE materials = list(/datum/material/silver = SMALL_MATERIAL_AMOUNT, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 2.5) build_path = /obj/item/magic_wand/techie + +/datum/design/board/stellar_oculory + name = "Stellar oculory" + desc = "The circuit board for a stellar oculory." + id = "stellar_oculory" + build_path = /obj/item/circuitboard/machine/stellar_oculory + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_RESEARCH + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING | DEPARTMENT_BITFLAG_SCIENCE diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm index 18434df004a5..cf978debbcac 100644 --- a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -22,7 +22,7 @@ research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS) /datum/techweb_node/stellar_oculory - id = TECHWEB_NODE_STELLAR_OCCULORY + id = TECHWEB_NODE_STELLAR_OCULORY starting_node = FALSE display_name = "Starlight-Mana Conversion" description = "Convert trace arcane essence from nearby starlight into usable mana" From d45a952ad25ef638f90bf23e9e9573ce5c85864b Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Wed, 26 Nov 2025 18:44:22 -0500 Subject: [PATCH 36/58] adds the meditation mat and all its functionality --- maplestation.dme | 2 + .../code/__DEFINES/status_effects.dm | 2 + maplestation_modules/code/__DEFINES/traits.dm | 2 + .../mana/sources/altars/meditation_mat.dm | 101 ++++++++++++++++++ .../modules/magic/story_spells/mana_charge.dm | 6 +- .../icons/obj/magic/altars.dmi | Bin 1413 -> 1662 bytes 6 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 maplestation_modules/code/__DEFINES/status_effects.dm create mode 100644 maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm diff --git a/maplestation.dme b/maplestation.dme index d4281278b7a5..aabecd088fce 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6297,6 +6297,7 @@ #include "maplestation_modules\code\__DEFINES\paperwork_defines.dm" #include "maplestation_modules\code\__DEFINES\signals.dm" #include "maplestation_modules\code\__DEFINES\spans.dm" +#include "maplestation_modules\code\__DEFINES\status_effects.dm" #include "maplestation_modules\code\__DEFINES\traits.dm" #include "maplestation_modules\code\__DEFINES\vv.dm" #include "maplestation_modules\code\__DEFINES\magic\attunements.dm" @@ -6631,6 +6632,7 @@ #include "maplestation_modules\code\modules\magic\mana\attunements\attunement.dm" #include "maplestation_modules\code\modules\magic\mana\sources\mana_batteries.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\_magic_altars.dm" +#include "maplestation_modules\code\modules\magic\mana\sources\altars\meditation_mat.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\nature_shrine.dm" #include "maplestation_modules\code\modules\magic\mana\sources\altars\stellar_oculory.dm" #include "maplestation_modules\code\modules\magic\mana\sources\leylines\leylines.dm" diff --git a/maplestation_modules/code/__DEFINES/status_effects.dm b/maplestation_modules/code/__DEFINES/status_effects.dm new file mode 100644 index 000000000000..0ee11c6d3305 --- /dev/null +++ b/maplestation_modules/code/__DEFINES/status_effects.dm @@ -0,0 +1,2 @@ +// place for IDs like its base code equivalent +#define MEDITATION_MAT_EFFECT "meditation_mat" diff --git a/maplestation_modules/code/__DEFINES/traits.dm b/maplestation_modules/code/__DEFINES/traits.dm index a48088faaf17..0f84670c0407 100644 --- a/maplestation_modules/code/__DEFINES/traits.dm +++ b/maplestation_modules/code/__DEFINES/traits.dm @@ -6,3 +6,5 @@ #define TRAIT_CAFFEINE_LOVER "caffeine_lover" /// First of a potential series, this is the trait a mob with the psionic quirk will get. generally affects the costs/cooldowns of specific spells #define TRAIT_FULL_PSIONIC "full_psionic" +/// Used to empower other mental effects, notably the meditate family +#define TRAIT_EMPOWERED_MEDITATION "empowered_meditation" diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm new file mode 100644 index 000000000000..713c4dba9dcc --- /dev/null +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm @@ -0,0 +1,101 @@ +/obj/structure/meditation_mat + name = "Meditation Mat" + desc = "A purple mat meant to empower those who meditate" // todo: this sucks rewrite it + + icon = 'maplestation_modules/icons/obj/magic/altars.dmi' + icon_state = "meditation_mat" + + can_buckle = TRUE + buckle_lying = 0 + resistance_flags = NONE + + var/foldable_type = /obj/item/meditation_mat + +/obj/structure/meditation_mat/examine(mob/user) + . = ..() + if(!isnull(foldable_type)) + . += span_notice("You can fold it up with a Right-click.") + +/obj/structure/meditation_mat/attack_hand_secondary(mob/user, list/modifiers) + . = ..() + if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + if(!ishuman(user) || !user.can_perform_action(src)) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + if(has_buckled_mobs()) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + + user.visible_message(span_notice("[user] collapses [src]."), span_notice("You collapse [src].")) + var/obj/structure/meditation_mat/folded_mat = new foldable_type(get_turf(src)) + user.put_in_hands(folded_mat) + qdel(src) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + +/obj/machinery/meditation_mat/proc/apply_effects(mob/living/target) + if(target != occupant) + return + target.apply_status_effect(/datum/status_effect/meditation_mat, MEDITATION_MAT_EFFECT) + +/obj/machinery/meditation_mat/proc/remove_effects(mob/living/target) + target.remove_status_effect(/datum/status_effect/meditation_mat, MEDITATION_MAT_EFFECT) + +/obj/machinery/meditation_mat/post_buckle_mob(mob/living/L) + if(!can_be_occupant(L)) + return + set_occupant(L) + apply_effects(L) + +/obj/machinery/meditation_mat/post_unbuckle_mob(mob/living/L) + remove_effects(L) + if(L == occupant) + set_occupant(null) + +// status effect +/datum/status_effect/meditation_mat + id = "meditation_mat_status" + duration = -1 + alert_type = /atom/movable/screen/alert/status_effect/meditation_mat + +/datum/status_effect/meditation_mat/on_apply() + . = ..() + if(!.) + return + owner.add_traits(list( + TRAIT_EMPOWERED_MEDITATION, + ), TRAIT_STATUS_EFFECT(id)) + +/datum/status_effect/meditation_mat/on_remove() + owner.remove_traits(list( + TRAIT_EMPOWERED_MEDITATION, + ), TRAIT_STATUS_EFFECT(id)) + return . = ..() + +/atom/movable/screen/alert/status_effect/meditation_mat + name = "Focused Meditation" + desc = "You are kneeling? resting? napping? On the mat. Your ability to focus on specific mental capabilities is improved." + icon_state = "woozy" + +// folded item +/obj/item/meditation_mat + name = "Folded Meditation Mat" + desc = "A mat for meditation, rolled and folded up for easy transport." + icon = 'icons/obj/medical/medical_bed.dmi' + icon_state = "emerg_folded" + inhand_icon_state = "emergencybed" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/meditation_mat/attack_self(mob/user) + deploy_bed(user, user.loc) + +/obj/item/meditation_mat/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(isopenturf(interacting_with)) + deploy_bed(user, interacting_with) + return ITEM_INTERACT_SUCCESS + return NONE + +/obj/item/meditation_mat/proc/deploy_bed(mob/user, atom/location) + var/obj/structure/meditation_mat/deployed = new /obj/structure/meditation_mat(location) + deployed.add_fingerprint(user) + qdel(src) diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index 33e1f3ddd847..0ef43942a072 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -30,7 +30,11 @@ . = ..() if(!do_after(cast_on, channel_time)) // don't want this casted mid combat return . | SPELL_CANCEL_CAST - var/randy_value = rand(random_value_floor, random_value_ceiling) + var/randy_value = 0 + if(HAS_TRAIT(cast_on, TRAIT_EMPOWERED_MEDITATION)) + randy_value = 40 + else + randy_value = rand(random_value_floor, random_value_ceiling) var/mana_to_gain = randy_value + base_mana_recharge cast_on.mana_pool.adjust_mana(mana_to_gain) diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi index 83f636e24a24fb8a44905fc460b3c20a22107190..db2055a1869e1a9afe73760e4283985fc7f70e52 100644 GIT binary patch delta 1538 zcmV+d2L1Vk3;qm{BmseuB}N`4IYqQu07F}35*R1{wE!_2EI1!BS|e5Ft3bYYIFWrD z8%!NWPD^M+BPEjn0004WQchC9U5JlI?SA=#izP4_prF3C` zA&kwK3^b`EWBq+Y3+^QD&V@6><<{!jcKx85TQ3)kiRPd#>b%=a@g~DAhtp9Chh!aZ zAu%v!tn3^xR#F&>Dd&R}j|d(&{#qU^jfr3Wsqc`m=&xV3htW|e+lg_SAZiLQGA(}} zlxw4Zq0D)Y+=YMXwQ7fE9q$9#=wL2cl^N^+00jI=L_t(oh255ka^g4;K#gZ0jE`_d zG6rME#Mr?9f8g{X$t`m^*{a>D?WsaSjo(wZ1eqZCU&X}4qkL%M$Mjz&?m7Vc+r&>C zOrN@!p@Qi%_tGouuKdprS0@CXPTwG=Q*wBJhLFIs`3zz{BS-iEb$6Bcf2Q^fVCox) zKcCq%K!-Do5fGoy5d=G=f%t@uA=u#zBLs=z8#oVWNch94;Tt#)Xh(?kjqT(JUxz0c>VX%89FIV^$H14FYZtROK4J_>BU z;oBA&LpUb|yc&Kg1-I9?2L->0*CPd+6&jf8B0>IYgZYm&8kp*TB1QiC zL%@B3lx!Agh?3qxQ&?QEV2Oq}?Hx3Q#pPH58diRbaAjcyXjuC#!jJJCQw0v&&qM`E(-jGFRcBeP@_;Uic7{HGgc#=c z#NsFqVp_Q~P;^C9KplV{1d1+-5SaY&3*tD)+ZI&^F2szoMYTqPYOJ79_gPF z8ds!%@@Lxr*V)grpekjH%E}jLEVv~+DOzlb?gb`)<}*0^c~L=yx2U>P0Rj~AYX~%` zTLI?Jc#F=1yf_2+x|Q~#N5WxKe0#ts5=Yar# z8lH#SIx24~xZtkMi(kR1MMB(Hw_RdDA|rlfDK{y!3zcagWdfr0^*A|0)lH2mfsm0=$aYRR-WS1@ZV#^ZR?-=h*v*6Fo>T o1N_tc*#9~*gW{GxF8`mzU($9i#^FiZkpKVy07*qoM6N<$f~6DMwEzGB delta 1287 zcmV+i1^D{@4227jBmr`fB}Nj!z`!LrMYLJ~LtA7L7$^U=0Fj9s7*0!QJD9C^00001 zbW%=J06^y0W&i*HnUTL0f6WSmFc5^#$x{Tqm;POQDT;WguMoDnO%_Zn*{yy328G^= zz0C*T%wbA%t(&$p)veVtCZ;Kxi#hN1TD@rypW$@W$|E^1E3klIj)j{drb4TM5@$YW z^+*tK&0i~kqn_mzp7sumoBpzD1N5Haw#|a$2+2}}UTFTi@XISrf8ABf8y_(mQNigu zE}sAZ1RP03K~z|U-IR-xsyGxyk$bfn9<89MU}$U}`v1Q;`l+zz{m+Hr8@Rrap|B|T{$zv%9{}fir+2#?hL43Hh9EQNDCWmQ94ttIXa29L z*Z@UJd4~Bj|MygEz#6hp!44ft%~ybLsqT>x#BlF@zD2CO0;#| z3Kj7|kz$+QP}@8}Kx-BecK|(z1RoT!$#37Nf7>SaRx61hIxFY|y+1eE=HQd!w$8n! zY5-*4sZODA>#>irR_pxs&40Ib9wLyn9J+28QFNCyqSpDH=l^|Q=YD~t1rLm8#XwDw zYMtNp9^BV?m_QJ}MUg>l1(e_E6x}zuw>s(o0ouB0>XrfMLATBCsBP}6p;H7H$4A|K ze|(n|`#7y(xnD34L5+{cqe0;| z((isZ^kKPQKm-ji1pvL@hvfk);5m*H0X-IYe_p}Qd4OO9p>qNFGWX*w_&N92fd3un zi)`P=2T+I5Jfufsj~WSq3qLy@@Z|vpNvs#s>S>;Q#YcAweR Date: Thu, 27 Nov 2025 22:05:48 -0500 Subject: [PATCH 37/58] fixes the typing on meditation mat, which makes it work as intended --- .../magic/mana/sources/altars/meditation_mat.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm index 713c4dba9dcc..7a8e189e0c4a 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm @@ -1,4 +1,4 @@ -/obj/structure/meditation_mat +/obj/machinery/meditation_mat name = "Meditation Mat" desc = "A purple mat meant to empower those who meditate" // todo: this sucks rewrite it @@ -8,15 +8,16 @@ can_buckle = TRUE buckle_lying = 0 resistance_flags = NONE + use_power = NO_POWER_USE var/foldable_type = /obj/item/meditation_mat -/obj/structure/meditation_mat/examine(mob/user) +/obj/machinery/meditation_mat/examine(mob/user) . = ..() if(!isnull(foldable_type)) . += span_notice("You can fold it up with a Right-click.") -/obj/structure/meditation_mat/attack_hand_secondary(mob/user, list/modifiers) +/obj/machinery/meditation_mat/attack_hand_secondary(mob/user, list/modifiers) . = ..() if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN @@ -26,7 +27,7 @@ return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN user.visible_message(span_notice("[user] collapses [src]."), span_notice("You collapse [src].")) - var/obj/structure/meditation_mat/folded_mat = new foldable_type(get_turf(src)) + var/obj/machinery/meditation_mat/folded_mat = new foldable_type(get_turf(src)) user.put_in_hands(folded_mat) qdel(src) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN @@ -96,6 +97,6 @@ return NONE /obj/item/meditation_mat/proc/deploy_bed(mob/user, atom/location) - var/obj/structure/meditation_mat/deployed = new /obj/structure/meditation_mat(location) + var/obj/machinery/meditation_mat/deployed = new /obj/machinery/meditation_mat(location) deployed.add_fingerprint(user) qdel(src) From f7cc47a48f9dfc2622661775d424e4fcf225ce43 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Fri, 28 Nov 2025 23:32:39 -0500 Subject: [PATCH 38/58] removes some temp code from mana tap --- .../code/modules/magic/mana/magic_wands.dm | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index 5689b4fc8583..dedc4b2cd02c 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -66,20 +66,6 @@ /// Weakref to the action that created us VAR_FINAL/datum/weakref/origin_ref -/obj/item/magic_wand/temporary/Initialize(mapload, datum/action/cooldown/spell/touch/finger_flame/origin) - . = ..() - if(origin) - origin_ref = WEAKREF(origin) - item_flags &= ~DROPDEL - -/obj/item/magic_wand/temporary/proc/clear_up(mob/user, do_message = FALSE) - var/datum/action/cooldown/spell/touch/finger_flame/origin = origin_ref?.resolve() - if(!QDELETED(origin)) - origin.remove_hand(user, do_message) - return - - qdel(src) - // given by the pseudo-spell gained from the psionic quirk /obj/item/magic_wand/temporary/psionic name = "Psychic Mana Tap" From 112627f5496c606c3fbf1c3c50cd66329798f18a Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 29 Nov 2025 13:40:05 -0500 Subject: [PATCH 39/58] don't need that --- maplestation_modules/code/modules/magic/mana/magic_wands.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index dedc4b2cd02c..aa26d57252f1 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -63,8 +63,6 @@ desc = "An ephemeral wand created by the power of Coderbus. Its life span is only brief, and its existence is fleeting. " item_flags = ABSTRACT|DROPDEL - /// Weakref to the action that created us - VAR_FINAL/datum/weakref/origin_ref // given by the pseudo-spell gained from the psionic quirk /obj/item/magic_wand/temporary/psionic From dd760019cb42ff729bb621a08e6f7b32af5a94f4 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 29 Nov 2025 22:16:54 -0500 Subject: [PATCH 40/58] adds meditation guidebooks and refactors the volitious lignite multipack --- maplestation.dme | 1 + .../game/objects/items/granters/meditation.dm | 47 ++++++++++++++++++ .../code/modules/cargo/goodies.dm | 21 +++++++- .../code/modules/cargo/packs.dm | 23 ++++++--- .../icons/obj/service/library.dmi | Bin 0 -> 457 bytes 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 maplestation_modules/code/game/objects/items/granters/meditation.dm create mode 100644 maplestation_modules/icons/obj/service/library.dmi diff --git a/maplestation.dme b/maplestation.dme index 4312549c89c5..d0df982ea7bc 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6405,6 +6405,7 @@ #include "maplestation_modules\code\game\objects\items\devices\scanners\autopsy_scanner.dm" #include "maplestation_modules\code\game\objects\items\devices\scanners\engineering.dm" #include "maplestation_modules\code\game\objects\items\devices\scanners\mana_lens.dm" +#include "maplestation_modules\code\game\objects\items\granters\meditation.dm" #include "maplestation_modules\code\game\objects\items\other_loadout_items\loadout_inhand_items.dm" #include "maplestation_modules\code\game\objects\items\storage\belt.dm" #include "maplestation_modules\code\game\objects\items\storage\boxes.dm" diff --git a/maplestation_modules/code/game/objects/items/granters/meditation.dm b/maplestation_modules/code/game/objects/items/granters/meditation.dm new file mode 100644 index 000000000000..e853ce1a8063 --- /dev/null +++ b/maplestation_modules/code/game/objects/items/granters/meditation.dm @@ -0,0 +1,47 @@ +/obj/item/book/granter/action/spell/meditation + name = "Nanotrasen Approved Meditation Guidebook" + granted_action = /datum/action/cooldown/spell/meditate + action_name = "meditation" + icon = 'maplestation_modules/icons/obj/service/library.dmi' + pages_to_mastery = 5 + icon_state = "bookmeditation" + desc = "The backside is littered with phrases such as: 'Get all access to your mind!' '10 Quick Tips to make your willpower Robust!' and 'Copyright Nanotrasen Inspiration Machine 2565.'" + remarks = list( + "So I just hold still and just... do nothing?", + "There are several sections about the productive benefits about meditation, but very little about the actual quality of life benefits.", + "Theres an already out of date coupon for 'healing crystals' in the pages.", + "You know, despite the eight spoked wheel representing the Noble Eightfold Path of Buddhism printed on the front, there has been no actual reference to Buddhism or its principles.", + "At this rate I should probably find what works for me on my own.", + "Focus on my breathing, and clear my mind of thoughts. Oh wait, I need to keep reading.", + "It says that I should ideally find a comfortable or non-intrusive place to meditate in, and then recommends a list of various mats and seats to try.", + ) + +/obj/item/book/granter/action/spell/meditate/recoil(mob/living/user) + . = ..() + to_chat(user, "That copy was dreadfully uninformative, unoriginal, and honestly boring.") + user.emote("yawn") + +/obj/item/book/granter/action/spell/lesser_splattercasting + name = "Nanotrasen Unapproved Meditation Guidebook" + granted_action = /datum/action/cooldown/spell/meditate/lesser_splattercasting + action_name = "lesser splattercasting" + icon = 'maplestation_modules/icons/obj/service/library.dmi' + pages_to_mastery = 5 + icon_state = "booklessersplattercasting" + desc = "The backside is littered with phrases such as: 'How to make your mind valid!' 'Greytiding success in your future!' and 'Copyright Syndicate Inspiration Machine 2565.'" + remarks = list( + "Wait, isn't blood magic banned by the Syndicate too?", + "Can they stop with the joke of repeatedly appending the same information with 'evil?' I don't think the Syndicate personally thinks they're evil.", + "It says that a sharp object isn't entirely needed, just intent and mastery.", + "Ideally I should have some method of recovering the blood available, such as iron or a Bloody Mary.", + "A prepared site where I can focus more clearly without environmental disturbances is best, especially since people will be confused about what I'm doing.", + "Doing this after drinking a Nar'Sour would be pretty funny, actually.", + "Another section of dry motivational quotes. Great.", + "This is just a blank red page.", + "Wait, why was there a blank red page? Doesn't blood turn brownish when it dries on paper?", + ) + +/obj/item/book/granter/action/spell/lesser_splattercasting/recoil(mob/living/user) + . = ..() + to_chat(user, "That copy was also dreadfully uninformative, unoriginal, and honestly boring.") + user.emote("yawn") diff --git a/maplestation_modules/code/modules/cargo/goodies.dm b/maplestation_modules/code/modules/cargo/goodies.dm index d457245377c9..8448fae29617 100644 --- a/maplestation_modules/code/modules/cargo/goodies.dm +++ b/maplestation_modules/code/modules/cargo/goodies.dm @@ -24,7 +24,7 @@ /datum/supply_pack/goody/volite_single_pack name = "Volite Crystal Single Pack" - desc = "A singular volite crystal, ready for use." // planned to be cut with rework part 2, here for ease of access. + desc = "A singular volite crystal, ready for use." cost = PAYCHECK_CREW * 4 contains = list( /obj/item/mana_battery/mana_crystal/standard, @@ -32,7 +32,7 @@ /datum/supply_pack/goody/small_volite_pack name = "Small Volite Crystal Single Pack" - desc = "A miniaturized volite crystal." // planned to be cut with rework part 2 + desc = "A miniaturized volite crystal." cost = PAYCHECK_CREW * 2 contains = list( /obj/item/mana_battery/mana_crystal/small, @@ -45,3 +45,20 @@ contains = list( /obj/item/mana_battery/mana_crystal/lignite, ) + +/datum/supply_pack/goody/meditation_guide_single + name = "Meditation Guide Single Pack" + desc = "Provides a single copy of the Nanotrasen Approved Meditation Guidebook" + cost = PAYCHECK_CREW + contains = list( + /obj/item/book/granter/action/spell/meditation, + ) + +/datum/supply_pack/service/lesser_splattercasting_guide + name = "Lesser Splattercasting Guide Multi-Pack" + desc = "Provides a single copy of the Nanotrasen Unapproved Meditation Guidebook" + cost = PAYCHECK_CREW + contraband = TRUE + contains = list( + /obj/item/book/granter/action/spell/lesser_splattercasting, + ) diff --git a/maplestation_modules/code/modules/cargo/packs.dm b/maplestation_modules/code/modules/cargo/packs.dm index 536579fa10c1..8331d02c3d1c 100644 --- a/maplestation_modules/code/modules/cargo/packs.dm +++ b/maplestation_modules/code/modules/cargo/packs.dm @@ -348,15 +348,26 @@ icon_state = "opscrate" base_icon_state = "opscrate" -/datum/supply_pack/science/volitious_lignite_single_pack +/datum/supply_pack/science/volitious_lignite name = "Volitious Lignite Pack" desc = "A bundle containing 5 pieces of a natural source of volite, volitious lignite." cost = PAYCHECK_COMMAND * 2 contains = list( - /obj/item/mana_battery/mana_crystal/lignite, - /obj/item/mana_battery/mana_crystal/lignite, - /obj/item/mana_battery/mana_crystal/lignite, - /obj/item/mana_battery/mana_crystal/lignite, - /obj/item/mana_battery/mana_crystal/lignite, + /obj/item/mana_battery/mana_crystal/lignite = 5, + ) +/datum/supply_pack/service/meditation_guide + name = "Meditation Guide Multi-Pack" + desc = "Provides a multi-pack of the Nanotrasen Approved Meditation Guidebook" + cost = PAYCHECK_CREW * 4 // you get the fifth one for free! + contains = list( + /obj/item/book/granter/action/spell/meditation = 5, ) +/datum/supply_pack/service/lesser_splattercasting_guide + name = "Lesser Splattercasting Guide Multi-Pack" + desc = "Provides a multi-pack of the Nanotrasen Unapproved Meditation Guidebook" + cost = PAYCHECK_CREW * 4 // you also get the fifth one for free! + contraband = TRUE + contains = list( + /obj/item/book/granter/action/spell/lesser_splattercasting = 5, + ) diff --git a/maplestation_modules/icons/obj/service/library.dmi b/maplestation_modules/icons/obj/service/library.dmi new file mode 100644 index 0000000000000000000000000000000000000000..870215b632f7e4838cc6b94fb24025a29b85f9fe GIT binary patch literal 457 zcmV;)0XF`LP)i*$+tJOBUy0d!JM zQvg8b*k%9#0El{2Sad{Xb7OL8aCB*JZU6vyoKseCa&`CgQ*iP1gNJ>835o@F%!9H%e(*p z0Jcd)K~y-6V_+CTfKdqyS_T)npU}Gd=N}An7s@ zzZ;|lH{$n2;cjvK;ZQDEj;5d-RY7}s1+s!-V-P^_TSGwrNkPqBAh?6z_n`3^YTmtj zH|q_O0wDh#5}$z`Xu&KbD>%@t0D+whBN+ey3A9+ik_Y^u00000NkvXXu0mjfmZ7gy literal 0 HcmV?d00001 From 021bdd07fa6cc317ead24ebfd53297bb12feb756 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sat, 29 Nov 2025 22:31:10 -0500 Subject: [PATCH 41/58] small changes, adds crafting for the mat and better hints at it --- .../code/game/objects/items/granters/meditation.dm | 2 +- .../code/modules/magic/mana/sources/altars/meditation_mat.dm | 4 ++++ .../code/modules/magic/story_spells/mana_charge.dm | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/maplestation_modules/code/game/objects/items/granters/meditation.dm b/maplestation_modules/code/game/objects/items/granters/meditation.dm index e853ce1a8063..ae7d5c58cd8a 100644 --- a/maplestation_modules/code/game/objects/items/granters/meditation.dm +++ b/maplestation_modules/code/game/objects/items/granters/meditation.dm @@ -13,7 +13,7 @@ "You know, despite the eight spoked wheel representing the Noble Eightfold Path of Buddhism printed on the front, there has been no actual reference to Buddhism or its principles.", "At this rate I should probably find what works for me on my own.", "Focus on my breathing, and clear my mind of thoughts. Oh wait, I need to keep reading.", - "It says that I should ideally find a comfortable or non-intrusive place to meditate in, and then recommends a list of various mats and seats to try.", + "It says that I should ideally find a comfortable or non-intrusive place to meditate in, and then recommends a list of various mats and seats to try. Or I could just make one with some cloth.", ) /obj/item/book/granter/action/spell/meditate/recoil(mob/living/user) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm index 7a8e189e0c4a..c409a2aadf3f 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm @@ -100,3 +100,7 @@ var/obj/machinery/meditation_mat/deployed = new /obj/machinery/meditation_mat(location) deployed.add_fingerprint(user) qdel(src) + +/obj/item/stack/sheet/cloth/get_main_recipes() + . = ..() + . += list(new /datum/stack_recipe("meditation mat", /obj/item/meditation_mat, 8)) diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index 0ef43942a072..fb5285572884 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -24,7 +24,7 @@ . = ..() if (!cast_on.mana_pool) cast_on.balloon_alert(cast_on, "no mana pool!") - return + return . | SPELL_CANCEL_CAST /datum/action/cooldown/spell/meditate/cast(mob/living/cast_on) . = ..() @@ -58,7 +58,7 @@ . = ..() if (HAS_TRAIT(cast_on, TRAIT_NOBLOOD)) cast_on.balloon_alert(cast_on, "no blood to use!") - return + return . | SPELL_CANCEL_CAST /datum/action/cooldown/spell/meditate/lesser_splattercasting/cast(mob/living/cast_on) . = ..() From f162a39a40479f2a453771f43ad649ba10a3656a Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 30 Nov 2025 13:33:17 -0500 Subject: [PATCH 42/58] mild changes to mana charge spells, fixes a path error in meditation book --- .../code/game/objects/items/granters/meditation.dm | 2 +- .../code/modules/magic/story_spells/mana_charge.dm | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/maplestation_modules/code/game/objects/items/granters/meditation.dm b/maplestation_modules/code/game/objects/items/granters/meditation.dm index ae7d5c58cd8a..0fbc0011663a 100644 --- a/maplestation_modules/code/game/objects/items/granters/meditation.dm +++ b/maplestation_modules/code/game/objects/items/granters/meditation.dm @@ -16,7 +16,7 @@ "It says that I should ideally find a comfortable or non-intrusive place to meditate in, and then recommends a list of various mats and seats to try. Or I could just make one with some cloth.", ) -/obj/item/book/granter/action/spell/meditate/recoil(mob/living/user) +/obj/item/book/granter/action/spell/meditation/recoil(mob/living/user) . = ..() to_chat(user, "That copy was dreadfully uninformative, unoriginal, and honestly boring.") user.emote("yawn") diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index fb5285572884..b2769cada81b 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -10,10 +10,11 @@ cooldown_time = 4 MINUTES invocation_type = INVOCATION_NONE spell_requirements = NONE - var/base_mana_recharge = 40 // the mana this recharges before a random varience + var/base_mana_recharge = 30 // the mana this recharges before a random varience var/random_value_floor = 0 var/random_value_ceiling = 25 + var/empowered_meditation_increase = 35 // when the player has empowered meditation through some means, this value is used instead of the above values in determining bonus invocation_self_message = "You begin focusing your mind on manipulating ambient mana." invocation = "Focus...." @@ -32,7 +33,7 @@ return . | SPELL_CANCEL_CAST var/randy_value = 0 if(HAS_TRAIT(cast_on, TRAIT_EMPOWERED_MEDITATION)) - randy_value = 40 + randy_value = empowered_meditation_increase else randy_value = rand(random_value_floor, random_value_ceiling) var/mana_to_gain = randy_value + base_mana_recharge @@ -47,12 +48,12 @@ sound = 'sound/weapons/slice.ogg' cooldown_time = 2 MINUTES // shorter as its not from no where - base_mana_recharge = 50 - var/base_bloodloss = 35 // the blood drained before a random variable is added. + base_mana_recharge = 40 + var/base_bloodloss = 50 // the blood drained before a random variable is added. invocation_self_message = "You prepare an incantation to trade some of your blood for mana." invocation = "Vy'Thr" - channel_time = 10 SECONDS + channel_time = 8 SECONDS /datum/action/cooldown/spell/meditate/lesser_splattercasting/before_cast(mob/living/cast_on) . = ..() From 1c218771de697d48f9c9ec24ea3d1e0fd3f3099f Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 30 Nov 2025 19:55:18 -0500 Subject: [PATCH 43/58] minor description/feedback changes from preround --- .../magic/mana/sources/altars/stellar_oculory.dm | 13 +++++++++++++ .../code/modules/magic/story_spells/mana_tap.dm | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 124d606e5766..93e84d080663 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -22,6 +22,7 @@ var/medium_pulse_value = 15 // partial starlight var/low_pulse_value = 5 // basically a pity value + var/last_pulse_value = NO_STARLIGHT // how strong was our last starlight pulse? this is used for checks for stuff like examines var/starlight_check_range = 3 /obj/machinery/power/magic_contraption/stellar/get_initial_mana_pool_type() @@ -66,6 +67,18 @@ mana_pool.amount += pulse_value last_pulse = world.time +/obj/machinery/power/magic_contraption/stellar/examine(mob/user) + . = ..() + if(!active) + return . += "The oculory is currently powered off." + switch(last_pulse_value) + if(FULL_STARLIGHT) + . += span_warning("The oculory is beaming with starlight!") + if(PARTIAL_STARLIGHT) + . += "The oculory is functioning under normal conditions." + if(NO_STARLIGHT) + . += span_warning("The oculory needs to gather more starlight.") + /obj/item/circuitboard/machine/stellar_oculory name = "\improper Stellar oculory (Machine Board)" greyscale_colors = CIRCUIT_COLOR_MAGIC diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm b/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm index 0cf8c31ab5c1..a5a94c90ff38 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_tap.dm @@ -1,6 +1,6 @@ /datum/action/cooldown/spell/touch/mana_tap name = "Mana Tap" - desc = "Extend a psychic tap to allow you to manipulate mana without a simple object." + desc = "Extend a psychic tap to allow you to manipulate mana without a simple object. Ideal for drawing from the mana sources of mana in space." button_icon = 'maplestation_modules/icons/mob/actions/actions_cantrips.dmi' button_icon_state = "spark_psi" sound = null From cd651d4d40b2256b97b051598fc5d80404c0c0f9 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 30 Nov 2025 19:59:26 -0500 Subject: [PATCH 44/58] kills an annoying run time --- maplestation_modules/code/modules/magic/mana/magic_wands.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maplestation_modules/code/modules/magic/mana/magic_wands.dm b/maplestation_modules/code/modules/magic/mana/magic_wands.dm index aa26d57252f1..7d7d162836bd 100644 --- a/maplestation_modules/code/modules/magic/mana/magic_wands.dm +++ b/maplestation_modules/code/modules/magic/mana/magic_wands.dm @@ -7,6 +7,8 @@ w_class = WEIGHT_CLASS_NORMAL // meant to be big and hard to store, additional reason to not use this /obj/item/magic_wand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers) + if(isturf(interacting_with)) + return var/datum/mana_pool/target_mana_pool = interacting_with.mana_pool var/datum/mana_pool/user_pool = user.mana_pool From 40ca4c6632cbeefa200d797c16ff7d3fd2fc3896 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Fri, 5 Dec 2025 16:03:52 -0500 Subject: [PATCH 45/58] SOMEHOW FIXES LEYLINE TEETERING AND DECIMAL MESSES????? --- .../code/__DEFINES/magic/magic_bitflags.dm | 10 +++++ .../code/modules/magic/mana/mana_pool.dm | 42 +++++++++++++++++-- .../magic/mana/sources/leylines/leylines.dm | 5 +++ .../modules/research/techweb/magic_nodes.dm | 4 +- 4 files changed, 55 insertions(+), 6 deletions(-) diff --git a/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm b/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm index 93c99c927756..46df3168b789 100644 --- a/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm +++ b/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm @@ -9,3 +9,13 @@ #define MANA_POOL_CANNOT_TRANSFER (1<<5) #define MANA_POOL_TRANSFER_SKIP_ACTIVE (1<<6) + +/// used to dictate what rules a mana transfer abide by +// No rules, default. Doesn't do anything, actually. +#define MANA_TRANSFER_ANARCHY (1<<0) +// Stops or skips transfer when the transfer hits or passes the target pool's softcap +#define MANA_TRANSFER_SOFTCAP (1<<1) +// Same as the above, but with added behavior to prevent a transfer that would put someone above the softcap +#define MANA_TRANSFER_SOFTCAP_NO_PASS (1<<2) +// None of the above, just adds manual rules to transfer. +#define MANA_TRANSFER_MANUAL_RULES (1<<3) diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index f4c274dd971e..8d3dbe59ae60 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -1,5 +1,9 @@ #define MANA_POOL_REPLACE_ALL_ATTUNEMENTS (1<<2) +/// the lowest decimal place we round to during dispersion +/// keep this to one decimal place unless you know what you're doing because anything more causes tomfoolery and really ugly decimals +#define MANA_DECIMAL_FLOOR 0.1 + /* DESIGN NOTES * This exists because mana will eventually have attunemenents and alignments that will incresae their efficiency in being used * on spells/by people with corresponding attunements/alignments, vice versa for conflicting. @@ -59,6 +63,13 @@ /// The intrinsic sources of mana we will constantly try to draw from. Uses defines from magic_charge_bitflags.dm. var/intrinsic_recharge_sources = MANA_ALL_LEYLINES + /// what ruleset do we need before we can transfer? flags in magic_bitflags.dm + var/mana_transfer_ruleset = MANA_TRANSFER_ANARCHY + + /// used by MANA_TRANSFER_MANUAL_RULES so these do nothing unless you're using that transfer ruleset. + /// and if so, what is that cap? + var/cap_transfer_limit = 999 + /datum/mana_pool/New(atom/parent = null) . = ..() donation_budget_this_tick = max_donation_rate_per_second @@ -103,7 +114,7 @@ //determines what the status displays, it'll be a generic/non-obvious value as a design choice if(amount) - if (amount < sc_very_low) + if (amount <= sc_very_low) general_amount_estimate = "VERY LOW" else if (amount > sc_very_low && amount < sc_low) general_amount_estimate = "LOW" @@ -130,8 +141,8 @@ // 2. we transfer mana // 3. we discharge excess mana /datum/mana_pool/process(seconds_per_tick) - - donation_budget_this_tick = (max_donation_rate_per_second * seconds_per_tick) //TODO: stop float imprecision + var/donation_this_tick = (max_donation_rate_per_second * seconds_per_tick) + donation_budget_this_tick = FLOOR(donation_this_tick, MANA_DECIMAL_FLOOR)//TODO: stop float imprecision but harder because i added a round? or not? if (ethereal_recharge_rate != 0) adjust_mana(ethereal_recharge_rate * seconds_per_tick, attunements_to_generate) @@ -141,6 +152,8 @@ for (var/datum/mana_pool/iterated_pool as anything in transferring_to) if (amount <= 0 || donation_budget_this_tick <= 0) break + if(!check_rulesets(iterated_pool, (get_transfer_rate_for(iterated_pool) * seconds_per_tick))) + continue if (transferring_to[iterated_pool] & MANA_POOL_SKIP_NEXT_TRANSFER) transferring_to[iterated_pool] &= ~MANA_POOL_SKIP_NEXT_TRANSFER continue @@ -148,9 +161,14 @@ transfer_mana_to(iterated_pool, seconds_per_tick) if (MANA_DISPERSE_EVENLY) - var/mana_to_disperse = (SAFE_DIVIDE(donation_budget_this_tick, length(transferring_to))) + var/budgeted_mana_to_disperse = SAFE_DIVIDE(donation_budget_this_tick, length(transferring_to)) + var/mana_to_disperse = (FLOOR(budgeted_mana_to_disperse, MANA_DECIMAL_FLOOR)) for (var/datum/mana_pool/iterated_pool as anything in transferring_to) + if (amount <= 0 || donation_budget_this_tick <= 0) + break + if(!check_rulesets(iterated_pool, mana_to_disperse)) + continue if (transferring_to[iterated_pool] & MANA_POOL_SKIP_NEXT_TRANSFER) transferring_to[iterated_pool] &= ~MANA_POOL_SKIP_NEXT_TRANSFER continue @@ -194,6 +212,22 @@ adjust_mana(exponential_decay) //just to be safe, in case we have any left over or didnt have a discharge destination +/datum/mana_pool/proc/check_rulesets(datum/mana_pool/target_pool, transferred_mana) + var/softcap_check = (target_pool.amount >= target_pool.softcap) + var/softcap_pass_check = ((target_pool.amount + transferred_mana) > target_pool.softcap) + + switch (mana_transfer_ruleset) + if (MANA_TRANSFER_SOFTCAP) + if (softcap_check) + return FALSE + if (MANA_TRANSFER_SOFTCAP_NO_PASS) + if ((softcap_check) || softcap_pass_check) + return FALSE + if (MANA_TRANSFER_MANUAL_RULES) + if (target_pool.amount >= cap_transfer_limit) + return FALSE + return TRUE + /// Perform a "natural" transfer where we use the default transfer rate, capped by the usual math /datum/mana_pool/proc/transfer_mana_to(datum/mana_pool/target_pool, seconds_per_tick = 1) return transfer_specific_mana(target_pool, get_transfer_rate_for(target_pool) * seconds_per_tick) diff --git a/maplestation_modules/code/modules/magic/mana/sources/leylines/leylines.dm b/maplestation_modules/code/modules/magic/mana/sources/leylines/leylines.dm index 9389c5143930..f7c89034e913 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/leylines/leylines.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/leylines/leylines.dm @@ -39,6 +39,11 @@ GLOBAL_LIST_EMPTY_TYPED(all_leylines, /datum/mana_pool/leyline) transfer_method = MANA_DISPERSE_EVENLY discharge_destinations = NONE + // leylines have a **ton** of implications and are global, so we're doing the safest one possible for now + // also this is insurance against "overload teetering" which was a problem during their first modern implementation + mana_transfer_ruleset = MANA_TRANSFER_SOFTCAP_NO_PASS + + cap_transfer_limit = BASE_MANA_SOFTCAP /datum/mana_pool/leyline/New() GLOB.all_leylines += src diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm index cf978debbcac..7d9f7dde303b 100644 --- a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -14,7 +14,7 @@ starting_node = FALSE display_name = "Artificial Volite Synthesis" description = "Produce volite gemstones through an admittedly inefficient process." - prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY, TECHWEB_NODE_MANA_BASE) + prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_BLUESPACE_THEORY) design_ids = list( "artificial_volite_large", "artificial_volite_small", @@ -25,7 +25,7 @@ id = TECHWEB_NODE_STELLAR_OCULORY starting_node = FALSE display_name = "Starlight-Mana Conversion" - description = "Convert trace arcane essence from nearby starlight into usable mana" + description = "Convert trace arcane essence from nearby starlight into usable mana." prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_PARTS_ADV) design_ids = list( "stellar_oculory", From ce58a38ae0a5d8932048408b2340da4dfab58f24 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 7 Dec 2025 13:34:49 -0500 Subject: [PATCH 46/58] adds sprites and better desc to the meditation mat --- .../mana/sources/altars/meditation_mat.dm | 36 +++++++++--------- .../icons/mob/inhands/equipment_lefthand.dmi | Bin 0 -> 334 bytes .../icons/mob/inhands/equipment_righthand.dmi | Bin 0 -> 346 bytes .../icons/obj/magic/objects.dmi | Bin 0 -> 473 bytes 4 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 maplestation_modules/icons/mob/inhands/equipment_lefthand.dmi create mode 100644 maplestation_modules/icons/mob/inhands/equipment_righthand.dmi create mode 100644 maplestation_modules/icons/obj/magic/objects.dmi diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm index c409a2aadf3f..e544fb7d6a4a 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/meditation_mat.dm @@ -1,6 +1,6 @@ /obj/machinery/meditation_mat name = "Meditation Mat" - desc = "A purple mat meant to empower those who meditate" // todo: this sucks rewrite it + desc = "A simple purple cloth mat made to allow one to rest and meditate on the floor comfortably." icon = 'maplestation_modules/icons/obj/magic/altars.dmi' icon_state = "meditation_mat" @@ -16,6 +16,8 @@ . = ..() if(!isnull(foldable_type)) . += span_notice("You can fold it up with a Right-click.") + if(!has_buckled_mobs() && can_buckle) + . += span_notice("While standing on [src], drag and drop your sprite onto [src] to buckle to it.") /obj/machinery/meditation_mat/attack_hand_secondary(mob/user, list/modifiers) . = ..() @@ -26,7 +28,7 @@ if(has_buckled_mobs()) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN - user.visible_message(span_notice("[user] collapses [src]."), span_notice("You collapse [src].")) + user.visible_message(span_notice("[user] rolls up [src]."), span_notice("You roll up [src].")) var/obj/machinery/meditation_mat/folded_mat = new foldable_type(get_turf(src)) user.put_in_hands(folded_mat) qdel(src) @@ -40,15 +42,15 @@ /obj/machinery/meditation_mat/proc/remove_effects(mob/living/target) target.remove_status_effect(/datum/status_effect/meditation_mat, MEDITATION_MAT_EFFECT) -/obj/machinery/meditation_mat/post_buckle_mob(mob/living/L) - if(!can_be_occupant(L)) +/obj/machinery/meditation_mat/post_buckle_mob(mob/living/meditator) + if(!can_be_occupant(meditator)) return - set_occupant(L) - apply_effects(L) + set_occupant(meditator) + apply_effects(meditator) -/obj/machinery/meditation_mat/post_unbuckle_mob(mob/living/L) - remove_effects(L) - if(L == occupant) +/obj/machinery/meditation_mat/post_unbuckle_mob(mob/living/meditator) + remove_effects(meditator) + if(meditator == occupant) set_occupant(null) // status effect @@ -80,23 +82,23 @@ /obj/item/meditation_mat name = "Folded Meditation Mat" desc = "A mat for meditation, rolled and folded up for easy transport." - icon = 'icons/obj/medical/medical_bed.dmi' - icon_state = "emerg_folded" - inhand_icon_state = "emergencybed" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + icon = 'maplestation_modules/icons/obj/magic/objects.dmi' + icon_state = "mat_folded" + inhand_icon_state = "mat_folded" + lefthand_file = 'maplestation_modules/icons/mob/inhands/equipment_lefthand.dmi' + righthand_file = 'maplestation_modules/icons/mob/inhands/equipment_righthand.dmi' w_class = WEIGHT_CLASS_NORMAL /obj/item/meditation_mat/attack_self(mob/user) - deploy_bed(user, user.loc) + deploy_mat(user, user.loc) /obj/item/meditation_mat/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) if(isopenturf(interacting_with)) - deploy_bed(user, interacting_with) + deploy_mat(user, interacting_with) return ITEM_INTERACT_SUCCESS return NONE -/obj/item/meditation_mat/proc/deploy_bed(mob/user, atom/location) +/obj/item/meditation_mat/proc/deploy_mat(mob/user, atom/location) var/obj/machinery/meditation_mat/deployed = new /obj/machinery/meditation_mat(location) deployed.add_fingerprint(user) qdel(src) diff --git a/maplestation_modules/icons/mob/inhands/equipment_lefthand.dmi b/maplestation_modules/icons/mob/inhands/equipment_lefthand.dmi new file mode 100644 index 0000000000000000000000000000000000000000..4a8af63c44a43ed5faeaf23ec48bd2ef2b3dfef6 GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e{s5m4*8>L*SjZbiDTn&Vx*1CA zgq^Sfsbee&@(X5gcy=QV$jPq?i70VNElw`VEGWs$&tqVym=hdUP*nQ;OK`!*uTQkR zb+yi&IUl?s)Zn7=gGV~&eKb!p6!rA(urLlXzHIEJFz3;vBa=cDf;G)Is@Un;tE-y2 zc6J-9ZeAg=WOBFhS`9;U(IaM0g2D>E7BkM~Ww;|RBg@6RY!}e#B2O2`5RcBcQ_k`> zDDb#_OlOFeXb59xILx5-ZvW(Y9Iit8vkG3kekyx!>wLqmOS-3PgH%L(zBs*Vn7L;{ zSBfU9Vrjz`R>k@3#toAfX`Hflet5QXhCz0*lAB)BHJ3Nv&dhuCO78#Z2$m!DEDY}7 c&Z#|ODmyPwDPQ#H3ea{2Pgg&ebxsLQ05d9m-~a#s literal 0 HcmV?d00001 diff --git a/maplestation_modules/icons/mob/inhands/equipment_righthand.dmi b/maplestation_modules/icons/mob/inhands/equipment_righthand.dmi new file mode 100644 index 0000000000000000000000000000000000000000..889ccc6086ac616320e1e2f0128b63c8b5d408b6 GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e{s5m4*8>L*SjZbiDTn&Vx*1CA zgq^Sfsbee&@(X5gcy=QV$jPq?i70VNElw`VEGWs$&tqVym=hdUP*nQ;OK`!*uTQkR zb+yi&IUl?s)Zn7=gGV~&eKb!p6!rA(urLlXzHIEJFz3;vBa=cDf;G)Is@Un;tE-y2 zc6J-9ZeAg=WOBFhS`9;U(IaM0g2D>E7BkM~Ww;|RBg@6RY!}e#I!_nJ5RcBcQ%(yu z7;vy&jA(G=7TCgIJeldwm-~|~1>LW7pL@~x^ov|IE5qR*@};wO&vN6Kd++(I883Y% zSec2q>prnk;!SV5a=!J{@38mlvkn^=xz6hOC!Wg8r#f-p5uusoOyAuPu9XP$G|WhJ pyv2FsJ-0!%y{E@|N6z?7jJ8t+{GYw5@&&qt!PC{xWt~$(69D6Df=d7Z literal 0 HcmV?d00001 diff --git a/maplestation_modules/icons/obj/magic/objects.dmi b/maplestation_modules/icons/obj/magic/objects.dmi new file mode 100644 index 0000000000000000000000000000000000000000..33cd9548344417fd287a357349eed806926c58c8 GIT binary patch literal 473 zcmV;~0Ve*5P)V=-0C=1w$2$suFc1a6I(v$T_TsNiBN0iVSCBwf6YvAcqSv>un<+7jlU-nD zOAn_U?+Y4zRg-$7mjI2fB^5aCLH=ZM!q6yAC+l_}o_#^e$CRPbklKW_AP!J< zK(KIu3UQCzqEoxIlb2*FmK&HH5uw_m{&^0(8-^0ZLia%U8BC7{^dIpbvx~0=(i@pAkThpwA=-B|1S^GvJ$k z4vt;5hoHhAV5>HDmwYPO*o!Iq<^So4DML&cma7-zWn={46~~xOus*Djj1rTzaoSdG z0KgjD3ZP36Q|43(4h})gsn=?K3jpBp?!F!&*Al#by#4JlI+ccf6P`lfc* Date: Sun, 7 Dec 2025 15:00:08 -0500 Subject: [PATCH 47/58] attempted to make early magic tech work, makes it default cause it didn't --- .../code/__DEFINES/research/techweb_nodes.dm | 2 +- .../code/modules/research/techweb/magic_nodes.dm | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm index e5210d0f663a..2943ab85e600 100644 --- a/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm +++ b/maplestation_modules/code/__DEFINES/research/techweb_nodes.dm @@ -1,3 +1,3 @@ #define TECHWEB_NODE_ARTIFICIAL_VOLITE "artificial_volite" -#define TECHWEB_NODE_MANA_BASE "mana_base" +#define TECHWEB_NODE_MANA_BASE "mana_base_node" #define TECHWEB_NODE_STELLAR_OCULORY "stellar_oculory_unlock" diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm index 7d9f7dde303b..8938881c11dc 100644 --- a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -1,20 +1,19 @@ -/datum/techweb_node/mana_base +/datum/techweb_node/mana_base_node id = TECHWEB_NODE_MANA_BASE - starting_node = FALSE + starting_node = TRUE display_name = "Early Magical Tech" description = "The first bits of technology surronding magic." design_ids = list( "mana_lens", "techie_magic_wand", ) - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS) /datum/techweb_node/artificial_volite id = TECHWEB_NODE_ARTIFICIAL_VOLITE starting_node = FALSE display_name = "Artificial Volite Synthesis" description = "Produce volite gemstones through an admittedly inefficient process." - prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_BLUESPACE_THEORY) + prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY) design_ids = list( "artificial_volite_large", "artificial_volite_small", @@ -26,7 +25,7 @@ starting_node = FALSE display_name = "Starlight-Mana Conversion" description = "Convert trace arcane essence from nearby starlight into usable mana." - prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_PARTS_ADV) + prereq_ids = list(TECHWEB_NODE_PARTS_ADV) design_ids = list( "stellar_oculory", ) From 5768b82837c062489500c6c26fc537d489166085 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 7 Dec 2025 18:36:30 -0500 Subject: [PATCH 48/58] gets early magic working as intended (thanks jade) --- .../code/modules/research/techweb/magic_nodes.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm index 8938881c11dc..bb20bd51d37a 100644 --- a/maplestation_modules/code/modules/research/techweb/magic_nodes.dm +++ b/maplestation_modules/code/modules/research/techweb/magic_nodes.dm @@ -1,19 +1,19 @@ /datum/techweb_node/mana_base_node id = TECHWEB_NODE_MANA_BASE - starting_node = TRUE display_name = "Early Magical Tech" description = "The first bits of technology surronding magic." + prereq_ids = list(TECHWEB_NODE_FUNDIMENTAL_SCI) design_ids = list( "mana_lens", "techie_magic_wand", ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_2_POINTS) /datum/techweb_node/artificial_volite id = TECHWEB_NODE_ARTIFICIAL_VOLITE - starting_node = FALSE display_name = "Artificial Volite Synthesis" description = "Produce volite gemstones through an admittedly inefficient process." - prereq_ids = list(TECHWEB_NODE_BLUESPACE_THEORY) + prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_BLUESPACE_THEORY) design_ids = list( "artificial_volite_large", "artificial_volite_small", @@ -22,10 +22,9 @@ /datum/techweb_node/stellar_oculory id = TECHWEB_NODE_STELLAR_OCULORY - starting_node = FALSE display_name = "Starlight-Mana Conversion" description = "Convert trace arcane essence from nearby starlight into usable mana." - prereq_ids = list(TECHWEB_NODE_PARTS_ADV) + prereq_ids = list(TECHWEB_NODE_MANA_BASE, TECHWEB_NODE_PARTS_ADV) design_ids = list( "stellar_oculory", ) From 49f2b08e54e29785b91de34c6892a3418f19f95d Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 7 Dec 2025 18:45:39 -0500 Subject: [PATCH 49/58] slight changes to lens and tech wand --- .../code/game/objects/items/devices/scanners/mana_lens.dm | 3 +-- .../code/modules/research/designs/magic_designs.dm | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm b/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm index 7f427caff838..b35126157b47 100644 --- a/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm +++ b/maplestation_modules/code/game/objects/items/devices/scanners/mana_lens.dm @@ -13,8 +13,7 @@ pickup_sound = 'maplestation_modules/sound/items/pickup/device.ogg' /obj/item/mana_lens/interact_with_atom(atom/movable/interacting_with, mob/living/user) - if (isturf(interacting_with)) - balloon_alert(user, "object has no mana pool!") // turfs should not ever have mana pools, doing this just so it doesn't error + if (isturf(interacting_with)) // turfs should not ever have mana pools, doing this so it doesn't runtime return if (!interacting_with.mana_pool) balloon_alert(user, "object has no mana pool!") diff --git a/maplestation_modules/code/modules/research/designs/magic_designs.dm b/maplestation_modules/code/modules/research/designs/magic_designs.dm index a504ef67c5a6..71e07fb43d97 100644 --- a/maplestation_modules/code/modules/research/designs/magic_designs.dm +++ b/maplestation_modules/code/modules/research/designs/magic_designs.dm @@ -5,6 +5,7 @@ build_type = PROTOLATHE materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2.5, /datum/material/gold = SMALL_MATERIAL_AMOUNT) build_path = /obj/item/mana_lens + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING /datum/design/artificial_volite_large name = "Artificial Volite Gem" @@ -31,6 +32,7 @@ build_type = PROTOLATHE materials = list(/datum/material/silver = SMALL_MATERIAL_AMOUNT, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 2.5) build_path = /obj/item/magic_wand/techie + departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING /datum/design/board/stellar_oculory name = "Stellar oculory" From 25b1f5f580706e1a0e7dd8f6c9637510fe4e04f2 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 8 Dec 2025 20:44:16 -0500 Subject: [PATCH 50/58] fixes a number of issues from last night's session --- .../code/modules/magic/mana/mana_pool.dm | 18 +++++++-------- .../mana/sources/altars/_magic_altars.dm | 17 ++++++++++++++ .../mana/sources/altars/nature_shrine.dm | 19 ++++++++++++++++ .../mana/sources/altars/stellar_oculory.dm | 21 ++++++++++++++---- .../icons/obj/magic/altars.dmi | Bin 1662 -> 1712 bytes 5 files changed, 61 insertions(+), 14 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index 8d3dbe59ae60..cd86dc3a955d 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -83,10 +83,12 @@ attunements = null attunements_to_generate = null - QDEL_LIST(transfer_rates) - QDEL_LIST(transfer_caps) - QDEL_LIST(transferring_to) - QDEL_LIST(transferring_from) // we already have a signal registered, so if we qdel we stop transfers + transfer_rates.Cut() + transfer_caps.Cut() + for (var/datum/mana_pool/pool_to_detach as anything in transferring_to) + stop_transfer(pool_to_detach, TRUE) + for (var/datum/mana_pool/pool_to_detach as anything in transferring_from) + pool_to_detach.stop_transfer(src, TRUE) STOP_PROCESSING(SSmagic, src) @@ -212,7 +214,8 @@ adjust_mana(exponential_decay) //just to be safe, in case we have any left over or didnt have a discharge destination -/datum/mana_pool/proc/check_rulesets(datum/mana_pool/target_pool, transferred_mana) +// apply the rulesets we have +/datum/mana_pool/proc/check_rulesets(datum/mana_pool/target_pool, transferred_mana) // pretty mean overhead on this one var/softcap_check = (target_pool.amount >= target_pool.softcap) var/softcap_pass_check = ((target_pool.amount + transferred_mana) > target_pool.softcap) @@ -267,8 +270,6 @@ transferring_to += target_pool target_pool.incoming_transfer_start(src) - RegisterSignal(target_pool, COMSIG_QDELETING, PROC_REF(stop_transfer)) - if (force_process) transferring_to[target_pool] |= MANA_POOL_SKIP_NEXT_TRANSFER transfer_mana_to(target_pool) // you can potentially get all you need instantly @@ -276,7 +277,6 @@ return MANA_POOL_TRANSFER_START /datum/mana_pool/proc/stop_transfer(datum/mana_pool/target_pool, forced = FALSE) - SIGNAL_HANDLER if (!forced && !QDELETED(target_pool) && (transferring_to[target_pool] & MANA_POOL_SKIP_NEXT_TRANSFER)) return MANA_POOL_TRANSFER_SKIP_ACTIVE // nope! @@ -284,8 +284,6 @@ transferring_to -= target_pool target_pool.incoming_transfer_end(src) - UnregisterSignal(target_pool, COMSIG_QDELETING) - return MANA_POOL_TRANSFER_STOP /datum/mana_pool/proc/incoming_transfer_start(datum/mana_pool/donator) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm index be31ebddb0bb..4bc50320df6d 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/_magic_altars.dm @@ -26,18 +26,25 @@ desc = "an honestly quite dull magic altar; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" icon = 'maplestation_modules/icons/obj/magic/altars.dmi' icon_state = "goner" + density = TRUE has_initial_mana_pool = TRUE var/max_allowed_transfer_distance = MAGIC_ALTAR_MAX_TRANSFER_DISTANCE /obj/structure/magic_altar/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar +/obj/structure/magic_altar/wrench_act(mob/living/user, obj/item/tool) + . = ..() + default_unfasten_wrench(user, tool, 5 SECONDS) + return ITEM_INTERACT_SUCCESS + /obj/machinery/power/magic_contraption // used for magitech stuff that needs to process. name = "magic contraption basetype" desc = "an honestly quite dull magic contraption; actually better question, why is this visible in game? if you or an admin/coder aren't testing stuff this shouldn't be here" icon = 'maplestation_modules/icons/obj/magic/altars.dmi' icon_state = "goner_machine" + density = TRUE use_power = NO_POWER_USE anchored = FALSE @@ -47,3 +54,13 @@ /obj/machinery/power/magic_contraption/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar +/obj/machinery/power/magic_contraption/wrench_act(mob/living/user, obj/item/tool) + . = ..() + if(default_unfasten_wrench(user, tool, 4 SECONDS)) + return ITEM_INTERACT_SUCCESS + +/obj/machinery/power/magic_contraption/crowbar_act(mob/living/user, obj/item/tool) + . = NONE + if(default_deconstruction_crowbar(tool)) + return ITEM_INTERACT_SUCCESS + diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index 5a93be69054f..cea6b82e4b39 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -11,6 +11,7 @@ name = "The Stump Which Watches" desc = "A peculiar stump. It feels like the hole in the center is looking at you. It appears you can cover its gaze with some flowers, though." icon_state = "magicstump_base" + var/drop_amount = 3 var/static/list/nature_shrine_mana_low = typecacheof(list( /obj/item/food/grown/poppy, @@ -33,6 +34,13 @@ /obj/structure/magic_altar/nature/get_initial_mana_pool_type() return /datum/mana_pool/magic_altar/nature +/obj/structure/magic_altar/nature/Initialize(mapload) + . = ..() + + var/static/list/tool_behaviors = list(TOOL_CROWBAR = list(SCREENTIP_CONTEXT_LMB = "Deconstruct")) + AddElement(/datum/element/contextual_screentip_tools, tool_behaviors) + register_context() + /obj/structure/magic_altar/nature/item_interaction(mob/living/user, obj/item/sacrifice, list/modifiers) ..() if (is_type_in_typecache(sacrifice, nature_shrine_mana_high)) // todo: add feedback to the player for this @@ -48,3 +56,14 @@ /obj/structure/magic_altar/nature/proc/accept_sacrifice(obj/item/sacrifice, mana_value) QDEL_NULL(sacrifice) mana_pool.amount += mana_value + +/obj/structure/magic_altar/nature/crowbar_act(mob/living/user, obj/item/tool) + balloon_alert(user, "deconstructing stump...") + if(!tool.use_tool(src, user, 5 SECONDS, volume=50)) + return + balloon_alert(user, "stump deconstructed") + tool.play_tool_sound(src) + new /obj/item/stack/sheet/mineral/wood(get_turf(src), drop_amount) + new /obj/item/mana_battery/mana_crystal/standard(get_turf(src), 1) + qdel(src) + return ITEM_INTERACT_SUCCESS diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 93e84d080663..7e3f12ad3981 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -1,9 +1,10 @@ // Stellar oculory. A more technomagic themed altar, which generates mana from exposure to starlight, based heavily off of starlight regeneration. #define COMSIG_STELLAR_OCULORY_PULSE_MANA "oculory_pulse_mana" +#define STELLAR_OCULORY_BASE_MANA 225 /datum/mana_pool/magic_altar/stellar - maximum_mana_capacity = 225 - softcap = 225 // identical to max cap, as it its a passive generator, and not an active one. + maximum_mana_capacity = STELLAR_OCULORY_BASE_MANA + softcap = STELLAR_OCULORY_BASE_MANA // identical to max cap, as it its a passive generator, and not an active one. amount = 0 max_donation_rate_per_second = 4 @@ -29,14 +30,16 @@ return /datum/mana_pool/magic_altar/stellar /obj/machinery/power/magic_contraption/stellar/interact(mob/user) + if(panel_open) + return balloon_alert(user, "Close the panel!") if(active) active = FALSE icon_state = "stellar_inactive" - return balloon_alert(user, "deactivated") + return balloon_alert(user, "deactivated the oculory") if(!active) active = TRUE icon_state = "stellar" - return balloon_alert(user, "activated") + return balloon_alert(user, "activated the oculory") /obj/machinery/power/magic_contraption/stellar/process(seconds_per_tick) if(!active) @@ -57,10 +60,13 @@ var/pulse_value = 0 switch(starlight_level) if(FULL_STARLIGHT) + last_pulse_value = FULL_STARLIGHT pulse_value = high_pulse_value if(PARTIAL_STARLIGHT) + last_pulse_value = PARTIAL_STARLIGHT pulse_value = medium_pulse_value if(NO_STARLIGHT) + last_pulse_value = NO_STARLIGHT pulse_value = low_pulse_value // anims here // also update sprite @@ -89,3 +95,10 @@ /obj/item/stack/sheet/mineral/gold = 2, /obj/item/mana_battery/mana_crystal/standard = 1, ) +/obj/machinery/power/magic_contraption/stellar/screwdriver_act(mob/living/user, obj/item/tool) + . = ITEM_INTERACT_BLOCKING + if (active) + user.balloon_alert(user, "Must be inactive!") + return . + if(default_deconstruction_screwdriver(user, "stellar_t", "stellar", tool)) + return ITEM_INTERACT_SUCCESS diff --git a/maplestation_modules/icons/obj/magic/altars.dmi b/maplestation_modules/icons/obj/magic/altars.dmi index db2055a1869e1a9afe73760e4283985fc7f70e52..45dd35847dafb30069139e5c014c44914c03df94 100644 GIT binary patch delta 1585 zcmV-12G05Z46qH57Y<+u0{{R3)kcR30001lktJ1;i5o3WOK8Brz%d&vI3F@vBUR?B zK)!c4OdUqvMUi~~0004WQchCOq?$qkq-nw2j_fF0j6HP%~)Ooj;;zI+wY)(fh9Flds zn#91EWo4&;v65n-n6f`e@r>Yc)j!IEC6oB=U-|(Fi~Q26Js3x!Oee;1gs3TiVVXAw zHWzb$`9T~g>%3gP`Y&Fqwr`f1ztHb&mbTESeE^@RA_`k29Ygw5$G6>o>F8y^ z__vPlFvNYh<_0IugOv;iSy3;WimOzbn5@EL?l(pS-x&Oj54Kjos;Sb$tpXzU(_=9(IStT&37 zfx#q30(^Z>g%R?EZ>cYUz!)+k;tBhI2P>}|U4V(DFNE2X`KiE^{S80}e-`GaLZ(qL z77%KJ90hH@_BUIk3DX55@YMd14Yvn_ImVZOov>UYP`hNy!2y4r}^=}Cq%ii|?JQ_k1OUvIPG_m@UKL|i9yY|nv z{sP3RYyTyGMl@}Z`}3{-^3t?_LGE9*ZyCMr7USFQ|5PaTKs{Do632W~Wd$!?eIxd1(8_xcg>k>3A)k)>2nmZxO*`npR_ zWl05TR=Clr0EyHtz_BUY;77WL`-KX0c7l!y6zrknwz<*0yr7D-Je^KE1cs7+*Rvvb zqkB13NP!L%ke<8Iu>xL0*;HT;74&w6KhsfAq9U^k@MX-)*5GGw|B{}6sLLABB2~%Q;g8UH380{ZBEQ%9 zs?j3EfII%W4p;guBEX%l+oTs|Kkwwvbj}y_H<>3r2I9fdD>~5skD+)+oX_X?^LrC# zP9WR>E`#9;P*qibUDcgHqN>~h>b~XIt^nstbunw!!Tlh8b_A#|JuOhu6`*PXbvtv` z!8?0NR2OSnJ39l}qWU6@=+WI4Sshe#bt=~#Xh40@+fzvwt^svrZ&6i0rh}SpQT><> z^d-fYtag3|*CD{w8Q@x7uiY)WBIOofoN8G$ z4Q8aIqo0bl0~*_@yACQ@IxoMSA?@hzf!?BE|XC1uL)#-`4a&}FJ{@daV jFc^*ikN&UYzdZg11~P%k0XkBP00000NkvXXu0mjf+jjhr delta 1553 zcmV+s2JZQ=4gL&}7Y;xO0{{R3(&~ad0001iktJ0RF&iv6A2M1aRpzTezIQm0dK-UC z9Y#(|Xhb6=lK=n!0d!JMQvg8b*k%9#0Hb zyxU9hCc`d=(@_eCWF2oIF)(JV>>PhER#F&>Dd&R}j|d(&{#qU^jfr3Wsqc`m=&xV3 zhtW|e+lg_SAZiLQGA(}}lxw4*%z2O8g@5U_YKLYW?*rNBU@lpe8SDT61pG-vK~z|U z-Ij@R;y4gMjb|W?k8njY24ly>*uejP;PfHMEps{9s@COrN@!p@Qi%_tGouuKdprS0@CXPTwG=Q*wBQkifI~3}QYb zNB97Bca`{mruGbA>KlkZpV>1&hck>35TDQy1UsaG_=Juj*x?K#1c~7rI1gw@_`|8; z8#oVWNG(c^cUDmF2H=EGdNO}W!0_e?LJ-8}9)&cWg`))#;EDgs1sOmQVLpca6aTjh zGC&RSSiuB36q&C84H5Uq2*Pj<0`nE1A*QAA0=S;jL<$mIu>yd-&*!OW4;j)qEP>Pm zL$fL5L5m7}fvg~;?WVGVl$J&c773lfM4rKf&LCM}ewl`N2F76dxR!q|#|rqGLXPN3 zVy~$c@P5;j95C30k%GwFQ+6aYp<5cUAhtkqq%Vmervj$Lw*of2 z&+ShIPt$m;ATb6$3T(dN+ZGu^I41?X8h$DTx7W0<09ky*_-o3?jBBn%z~aupb$vIz zg0*<0V1GELfu?2L->0*CPd+6&jf8 zB0>IYgZYm&8kp)LMgICjzzSh2RT=i{-cYU;xF! z$8Ti*0~AXi|1CZ#Tp38;4D%l!t_-Aq7vDSX(uL#4^nWXq`e*s4p;eG+odrt&EdP?f z)hgfZas`v`Jo%Y#Aw_(lJYe%=VG zgK1C6RSX0=({0nV9R!XVSEPXQXWIYQ+0V0}DrJkx$`@!XxFtL(T5O8$1tx#yGdTNs zQ9*^bsJees0Rj~AYX~%`TLI?Jc#F=1yf_2+x|Q~#N5yDsL;e;I7S!U%`K=MMBjh8q1+h$2{S21vk6jC&ZSjk2pNBUfDK{y!3zcagWdfr0^*A|0)lH2mfsm0=$aYRR-V% z@%T^k`+M8x*!zeRJxDJD{L}o{|2i^*;+8%x|DVKP(snM!;Yr((00000NkvXXu0mjf D0Kwn- From 148d6563b03e05bc3887724c7d94e5d8133f5d4f Mon Sep 17 00:00:00 2001 From: Yellow Wollywog <88261474+Wollywoger@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:31:16 -0500 Subject: [PATCH 51/58] fixes dme --- maplestation.dme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maplestation.dme b/maplestation.dme index d0df982ea7bc..4ce291af1761 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6792,6 +6792,7 @@ #include "maplestation_modules\code\modules\vending\wardrobes.dm" #include "maplestation_modules\code\modules\wiremod\component_printer.dm" #include "maplestation_modules\code\modules\wiremod\shells.dm" +#ifdef MAPLESTATION_STORY_CONTENT #include "maplestation_modules\story_content\albert_equipment\code\albertclothing.dm" #include "maplestation_modules\story_content\albert_equipment\code\albertitem.dm" #include "maplestation_modules\story_content\alraune_miscitems\code\alrmiscitem.dm" @@ -6830,4 +6831,5 @@ #include "maplestation_modules\story_content\volkan_equipment\code\volkanpets_ai.dm" #include "maplestation_modules\story_content\volkan_equipment\datums\loadout_datum.dm" #include "maplestation_modules\story_content\wollys_items\code\wollysitems.dm" +#endif // MAPLESTATION_STORY_CONTENT // END_INCLUDE From 8940e10d8201414cb1bfb2279e16cad359e55a38 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 14 Dec 2025 17:34:18 -0500 Subject: [PATCH 52/58] minor linter fix --- .../code/modules/magic/mana/sources/altars/stellar_oculory.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm index 7e3f12ad3981..9abe91844614 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/stellar_oculory.dm @@ -31,7 +31,7 @@ /obj/machinery/power/magic_contraption/stellar/interact(mob/user) if(panel_open) - return balloon_alert(user, "Close the panel!") + return balloon_alert(user, "close the panel first!") if(active) active = FALSE icon_state = "stellar_inactive" @@ -98,7 +98,7 @@ /obj/machinery/power/magic_contraption/stellar/screwdriver_act(mob/living/user, obj/item/tool) . = ITEM_INTERACT_BLOCKING if (active) - user.balloon_alert(user, "Must be inactive!") + user.balloon_alert(user, "deactivate first!") return . if(default_deconstruction_screwdriver(user, "stellar_t", "stellar", tool)) return ITEM_INTERACT_SUCCESS From e2a5b4b732cd57ef51e3e64f5814aba8942c123b Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 14 Dec 2025 17:56:19 -0500 Subject: [PATCH 53/58] is this what you want? --- .../modules/magic/mana/sources/altars/nature_shrine.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index cea6b82e4b39..9ac08d9a0f53 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -37,9 +37,12 @@ /obj/structure/magic_altar/nature/Initialize(mapload) . = ..() - var/static/list/tool_behaviors = list(TOOL_CROWBAR = list(SCREENTIP_CONTEXT_LMB = "Deconstruct")) + var/static/list/tool_behaviors = list( + TOOL_CROWBAR = list( + SCREENTIP_CONTEXT_LMB = "Deconstruct" + ), + ) AddElement(/datum/element/contextual_screentip_tools, tool_behaviors) - register_context() /obj/structure/magic_altar/nature/item_interaction(mob/living/user, obj/item/sacrifice, list/modifiers) ..() From 87269d843f06b90d6dccc905dfcbc88675d0a713 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Mon, 15 Dec 2025 17:20:34 -0500 Subject: [PATCH 54/58] housekeeping surronding the meditate family, moves them to a subtype of spell/charged/ --- .../game/objects/items/granters/meditation.dm | 4 +-- .../items/spellbook_item_cantrips.dm | 2 +- .../items/spellbook_item_manipulation.dm | 7 +++-- .../modules/magic/story_spells/mana_charge.dm | 28 ++++++++++--------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/maplestation_modules/code/game/objects/items/granters/meditation.dm b/maplestation_modules/code/game/objects/items/granters/meditation.dm index 0fbc0011663a..8887a03065fc 100644 --- a/maplestation_modules/code/game/objects/items/granters/meditation.dm +++ b/maplestation_modules/code/game/objects/items/granters/meditation.dm @@ -1,6 +1,6 @@ /obj/item/book/granter/action/spell/meditation name = "Nanotrasen Approved Meditation Guidebook" - granted_action = /datum/action/cooldown/spell/meditate + granted_action = /datum/action/cooldown/spell/charged/meditate action_name = "meditation" icon = 'maplestation_modules/icons/obj/service/library.dmi' pages_to_mastery = 5 @@ -23,7 +23,7 @@ /obj/item/book/granter/action/spell/lesser_splattercasting name = "Nanotrasen Unapproved Meditation Guidebook" - granted_action = /datum/action/cooldown/spell/meditate/lesser_splattercasting + granted_action = /datum/action/cooldown/spell/charged/meditate/lesser_splattercasting action_name = "lesser splattercasting" icon = 'maplestation_modules/icons/obj/service/library.dmi' pages_to_mastery = 5 diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm index 650db554ee6d..56df1cd8495f 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_cantrips.dm @@ -224,7 +224,7 @@ GLOBAL_LIST_INIT(spellbook_cantrip_items, generate_spellbook_items(SPELLBOOK_CAT /datum/spellbook_item/spell/light_breaker name = "Light Breaker" - description = "Fire a fast projectile which shatters most lights.." + description = "Fire a fast projectile which shatters most lights." lore = "Favorite of dark mages, nightmares, and wizards suffering from a migrane, this spell propels a near imperceptible lance which shatters a targeted light source." category = SPELLBOOK_CATEGORY_CANTRIPS diff --git a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm index 88bcdce6153a..3eed8a3f005d 100644 --- a/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm +++ b/maplestation_modules/code/modules/client/preferences/spellbook/items/spellbook_item_manipulation.dm @@ -5,11 +5,12 @@ GLOBAL_LIST_INIT(spellbook_manipulation_items, generate_spellbook_items(SPELLBOO description = "Use mental focus to draw mana within yourself" lore = "The most basic method of regenerating mana on your own. \ Casting this invocation- while focusing- will allow you to draw mana from the ambient environment. \ - Do note that this will take a while between casts, and you should still find other methods of regeneration." + Do note that this will take a while between casts, and you should still find other methods of regeneration. \ + This can be empowered through various means, such as via a cloth mat." category = SPELLBOOK_CATEGORY_MANIPULATION - our_action_typepath = /datum/action/cooldown/spell/meditate + our_action_typepath = /datum/action/cooldown/spell/charged/meditate /datum/spellbook_item/spell/mana_sense name = "Mana Sense" @@ -31,4 +32,4 @@ GLOBAL_LIST_INIT(spellbook_manipulation_items, generate_spellbook_items(SPELLBOO category = SPELLBOOK_CATEGORY_MANIPULATION - our_action_typepath = /datum/action/cooldown/spell/meditate/lesser_splattercasting + our_action_typepath = /datum/action/cooldown/spell/charged/meditate/lesser_splattercasting diff --git a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm index b2769cada81b..ea40bd009653 100644 --- a/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm +++ b/maplestation_modules/code/modules/magic/story_spells/mana_charge.dm @@ -1,5 +1,5 @@ // recover mana on your own. longer recharge. -/datum/action/cooldown/spell/meditate +/datum/action/cooldown/spell/charged/meditate name = "Meditation" desc = "Regenerate some of your mana by focusing within yourself. Takes a period of time to cast." button_icon = 'icons/effects/effects.dmi' @@ -7,6 +7,7 @@ sound = 'sound/magic/staff_healing.ogg' school = SCHOOL_UNSET // no idea where this would go tbh + channel_flags = IGNORE_HELD_ITEM cooldown_time = 4 MINUTES invocation_type = INVOCATION_NONE spell_requirements = NONE @@ -17,22 +18,20 @@ var/empowered_meditation_increase = 35 // when the player has empowered meditation through some means, this value is used instead of the above values in determining bonus invocation_self_message = "You begin focusing your mind on manipulating ambient mana." - invocation = "Focus...." - invocation_type = INVOCATION_WHISPER - var/channel_time = 12 SECONDS + channel_time = 12 SECONDS -/datum/action/cooldown/spell/meditate/before_cast(mob/living/cast_on) + var/allow_empowerment = TRUE // does this version allow for empowerment from stuff like the meditation mat? + +/datum/action/cooldown/spell/charged/meditate/before_cast(mob/living/cast_on) . = ..() if (!cast_on.mana_pool) cast_on.balloon_alert(cast_on, "no mana pool!") return . | SPELL_CANCEL_CAST -/datum/action/cooldown/spell/meditate/cast(mob/living/cast_on) +/datum/action/cooldown/spell/charged/meditate/cast(mob/living/cast_on) . = ..() - if(!do_after(cast_on, channel_time)) // don't want this casted mid combat - return . | SPELL_CANCEL_CAST var/randy_value = 0 - if(HAS_TRAIT(cast_on, TRAIT_EMPOWERED_MEDITATION)) + if(HAS_TRAIT(cast_on, TRAIT_EMPOWERED_MEDITATION) && allow_empowerment) randy_value = empowered_meditation_increase else randy_value = rand(random_value_floor, random_value_ceiling) @@ -40,7 +39,7 @@ cast_on.mana_pool.adjust_mana(mana_to_gain) // recover mana using your own blood. no protections from using this at low blood volume. -/datum/action/cooldown/spell/meditate/lesser_splattercasting +/datum/action/cooldown/spell/charged/meditate/lesser_splattercasting name = "Lesser Splattercasting" desc = "Drain some of your own blood to recover mana. This does not prevent you from bleeding out." button_icon = 'icons/effects/bleed.dmi' @@ -52,16 +51,19 @@ var/base_bloodloss = 50 // the blood drained before a random variable is added. invocation_self_message = "You prepare an incantation to trade some of your blood for mana." - invocation = "Vy'Thr" channel_time = 8 SECONDS -/datum/action/cooldown/spell/meditate/lesser_splattercasting/before_cast(mob/living/cast_on) +/datum/action/cooldown/spell/charged/meditate/lesser_splattercasting/before_cast(mob/living/cast_on) . = ..() if (HAS_TRAIT(cast_on, TRAIT_NOBLOOD)) cast_on.balloon_alert(cast_on, "no blood to use!") return . | SPELL_CANCEL_CAST + var/highest_blood_drain = base_bloodloss + random_value_ceiling // what is the highest amount of blood we can drain + if (cast_on.blood_volume <= highest_blood_drain) + cast_on.balloon_alert(cast_on, "too little blood!") // this is a failsafe added because someone (you know who you are) managed to get negative blood by using another exploit, which is now patched + return . | SPELL_CANCEL_CAST -/datum/action/cooldown/spell/meditate/lesser_splattercasting/cast(mob/living/cast_on) +/datum/action/cooldown/spell/charged/meditate/lesser_splattercasting/cast(mob/living/cast_on) . = ..() var/random_bloodloss_value = rand(random_value_floor, random_value_ceiling) var/blood_drain = base_bloodloss + random_bloodloss_value From c019f70259530e1c0f9161e503f44d1af8791f8c Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Sun, 28 Dec 2025 11:59:36 -0500 Subject: [PATCH 55/58] disables every pool taking from leylines automatically cause that has notable issues for the system (and some performance, ew) --- maplestation_modules/code/modules/magic/mana/mana_pool.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index cd86dc3a955d..24e0470408f3 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -61,7 +61,7 @@ var/discharge_method = MANA_SEQUENTIAL /// The intrinsic sources of mana we will constantly try to draw from. Uses defines from magic_charge_bitflags.dm. - var/intrinsic_recharge_sources = MANA_ALL_LEYLINES + var/intrinsic_recharge_sources = NONE /// what ruleset do we need before we can transfer? flags in magic_bitflags.dm var/mana_transfer_ruleset = MANA_TRANSFER_ANARCHY From ee08f572c6ef8d5ab01d982253d0f45f0fd34967 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Wed, 7 Jan 2026 17:34:44 -0500 Subject: [PATCH 56/58] completely re-does the ruleset system, drops cost of the ruleset system down to less than half of its previous --- .../code/__DEFINES/magic/magic_bitflags.dm | 2 +- .../code/modules/magic/mana/living_mana.dm | 2 + .../code/modules/magic/mana/mana_pool.dm | 80 ++++++++++++++----- 3 files changed, 61 insertions(+), 23 deletions(-) diff --git a/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm b/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm index 46df3168b789..65dd75831c51 100644 --- a/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm +++ b/maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm @@ -10,7 +10,7 @@ #define MANA_POOL_TRANSFER_SKIP_ACTIVE (1<<6) -/// used to dictate what rules a mana transfer abide by +/// used to dictate which of the default rules a mana transfer will abide by // No rules, default. Doesn't do anything, actually. #define MANA_TRANSFER_ANARCHY (1<<0) // Stops or skips transfer when the transfer hits or passes the target pool's softcap diff --git a/maplestation_modules/code/modules/magic/mana/living_mana.dm b/maplestation_modules/code/modules/magic/mana/living_mana.dm index 5169b609d71b..7aa112dcfe99 100644 --- a/maplestation_modules/code/modules/magic/mana/living_mana.dm +++ b/maplestation_modules/code/modules/magic/mana/living_mana.dm @@ -12,6 +12,8 @@ exponential_decay_divisor = BASE_CARBON_MANA_EXPONENTIAL_DIVISOR + intrinsic_recharge_sources = MANA_ALL_LEYLINES + // carbons have softcap mults, this adds it to the pool. /mob/living/carbon/initialize_mana_pool() var/datum/mana_pool/mob/living/carbon/our_pool = ..() diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index 24e0470408f3..6f7abd656ff3 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -63,12 +63,13 @@ /// The intrinsic sources of mana we will constantly try to draw from. Uses defines from magic_charge_bitflags.dm. var/intrinsic_recharge_sources = NONE - /// what ruleset do we need before we can transfer? flags in magic_bitflags.dm + /// what ruleset do we abide by in regards to mana transferrence? flags in magic_bitflags.dm, and the default callback procs are later down this file var/mana_transfer_ruleset = MANA_TRANSFER_ANARCHY + var/datum/callback/check_ruleset_callback // where we store what rule proc we use, don't touch this unless you're doing stuff that can't be done with other rulesets - /// used by MANA_TRANSFER_MANUAL_RULES so these do nothing unless you're using that transfer ruleset. + /// used by MANA_TRANSFER_MANUAL_RULES so this does nothing unless you're using that transfer ruleset. /// and if so, what is that cap? - var/cap_transfer_limit = 999 + var/cap_transfer_limit /datum/mana_pool/New(atom/parent = null) . = ..() @@ -79,6 +80,9 @@ START_PROCESSING(SSmagic, src) + if(!check_ruleset_callback) + update_transfer_ruleset() + /datum/mana_pool/Destroy(force, ...) attunements = null attunements_to_generate = null @@ -138,6 +142,24 @@ return GLOB.default_attunements.Copy() +/datum/mana_pool/proc/update_transfer_ruleset() + switch (mana_transfer_ruleset) + if (MANA_TRANSFER_SOFTCAP) + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_softcap)) + if (MANA_TRANSFER_SOFTCAP_NO_PASS) + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_softcap_no_pass)) + if (MANA_TRANSFER_MANUAL_RULES) + if (!cap_transfer_limit) + stack_trace("Manual Transfer rules were set on [src] without a transfer limit defined!") // forgetting something? + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_anarchy))// failsafe, default to ruleless + else + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_manual_rules)) + if(MANA_TRANSFER_ANARCHY) + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_anarchy)) + else + stack_trace("Update Transfer Ruleset was called on [src] without a valid prefab ruleset defined!") + src.check_ruleset_callback = CALLBACK(src, PROC_REF(transfer_rule_anarchy)) // again, failsafe + // order of operations is as follows: // 1. we recharge // 2. we transfer mana @@ -154,7 +176,7 @@ for (var/datum/mana_pool/iterated_pool as anything in transferring_to) if (amount <= 0 || donation_budget_this_tick <= 0) break - if(!check_rulesets(iterated_pool, (get_transfer_rate_for(iterated_pool) * seconds_per_tick))) + if(!check_ruleset_callback?.Invoke(iterated_pool, (get_transfer_rate_for(iterated_pool) * seconds_per_tick))) continue if (transferring_to[iterated_pool] & MANA_POOL_SKIP_NEXT_TRANSFER) transferring_to[iterated_pool] &= ~MANA_POOL_SKIP_NEXT_TRANSFER @@ -169,7 +191,7 @@ for (var/datum/mana_pool/iterated_pool as anything in transferring_to) if (amount <= 0 || donation_budget_this_tick <= 0) break - if(!check_rulesets(iterated_pool, mana_to_disperse)) + if(!check_ruleset_callback?.Invoke(iterated_pool, mana_to_disperse)) continue if (transferring_to[iterated_pool] & MANA_POOL_SKIP_NEXT_TRANSFER) transferring_to[iterated_pool] &= ~MANA_POOL_SKIP_NEXT_TRANSFER @@ -214,23 +236,6 @@ adjust_mana(exponential_decay) //just to be safe, in case we have any left over or didnt have a discharge destination -// apply the rulesets we have -/datum/mana_pool/proc/check_rulesets(datum/mana_pool/target_pool, transferred_mana) // pretty mean overhead on this one - var/softcap_check = (target_pool.amount >= target_pool.softcap) - var/softcap_pass_check = ((target_pool.amount + transferred_mana) > target_pool.softcap) - - switch (mana_transfer_ruleset) - if (MANA_TRANSFER_SOFTCAP) - if (softcap_check) - return FALSE - if (MANA_TRANSFER_SOFTCAP_NO_PASS) - if ((softcap_check) || softcap_pass_check) - return FALSE - if (MANA_TRANSFER_MANUAL_RULES) - if (target_pool.amount >= cap_transfer_limit) - return FALSE - return TRUE - /// Perform a "natural" transfer where we use the default transfer rate, capped by the usual math /datum/mana_pool/proc/transfer_mana_to(datum/mana_pool/target_pool, seconds_per_tick = 1) return transfer_specific_mana(target_pool, get_transfer_rate_for(target_pool) * seconds_per_tick) @@ -386,4 +391,35 @@ return (softcap / maximum_mana_capacity) * 100 +// default transfer rules, all call backs decided by what you put in mana_transfer_ruleset, set in check_ruleset_callback, called by most transfer things. +// these aren't used by default, and you can set you own for whatever pool you use: though feel to add those you use on multiple different subtypes here, because this is just a place where the most common ones are stored + +// FOR THE LOVE OF GOD READ THIS: MAKE SURE ALL OF THESE, AND ANY NEW CALLBACKS YOU MAKE, HAVE THE SAME ARGS, EVEN IF THEY'RE NOT USED. AND MAKE SURE ANY TIME YOU ADD A NEW INVOKE, IT SENDS THE SAME SET OF ARGS, IT WILL SAVE EVERYONE HEADACHES + +/datum/mana_pool/proc/transfer_rule_softcap(datum/mana_pool/pool, transferred_mana) + var/datum/mana_pool/target_pool = pool + var/softcap_check = (target_pool.amount >= target_pool.softcap) + if (softcap_check) + return FALSE + return TRUE + +/datum/mana_pool/proc/transfer_rule_softcap_no_pass(datum/mana_pool/pool, transferred_mana) + var/datum/mana_pool/target_pool = pool + var/softcap_check = (target_pool.amount >= target_pool.softcap) + var/softcap_pass_check = ((target_pool.amount + transferred_mana) > target_pool.softcap) + if ((softcap_check) || softcap_pass_check) + return FALSE + return TRUE + +/datum/mana_pool/proc/transfer_rule_manual_rules(datum/mana_pool/pool, transferred_mana) + var/datum/mana_pool/target_pool = pool + if (!cap_transfer_limit) // this should've been caught during init but i'm adding a second failsafe anyways + return FALSE // no runtime either, because this is processed each tick, it would be runtime hell + if (target_pool.amount >= cap_transfer_limit) + return FALSE + return TRUE + +/datum/mana_pool/proc/transfer_rule_anarchy(datum/mana_pool/pool, transferred_mana) + return TRUE // because no rules, no checks + #undef MANA_POOL_REPLACE_ALL_ATTUNEMENTS From 31e572397c1547ca22f054e836bc2b0a1f86ee71 Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Wed, 7 Jan 2026 19:39:27 -0500 Subject: [PATCH 57/58] uhhh lets see if this'll fix it --- maplestation_modules/code/modules/magic/mana/mana_pool.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/maplestation_modules/code/modules/magic/mana/mana_pool.dm b/maplestation_modules/code/modules/magic/mana/mana_pool.dm index 6f7abd656ff3..bf3bf1eb9fb4 100644 --- a/maplestation_modules/code/modules/magic/mana/mana_pool.dm +++ b/maplestation_modules/code/modules/magic/mana/mana_pool.dm @@ -101,6 +101,7 @@ else parent.mana_pool = null parent = null + check_ruleset_callback = null return ..() From fcaa82a55925158545bb40a501c182b618c2e31a Mon Sep 17 00:00:00 2001 From: Wollywoger Date: Thu, 8 Jan 2026 14:01:24 -0500 Subject: [PATCH 58/58] should fix the linter error on the stump, adds anchor/unanchor to the stump as well --- .../mana/sources/altars/nature_shrine.dm | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm index 9ac08d9a0f53..c6e2bedae349 100644 --- a/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm +++ b/maplestation_modules/code/modules/magic/mana/sources/altars/nature_shrine.dm @@ -37,11 +37,17 @@ /obj/structure/magic_altar/nature/Initialize(mapload) . = ..() - var/static/list/tool_behaviors = list( - TOOL_CROWBAR = list( - SCREENTIP_CONTEXT_LMB = "Deconstruct" + var/static/list/tool_behaviors + if(!tool_behaviors) + tool_behaviors = string_assoc_nested_list(list( + TOOL_CROWBAR = list( + SCREENTIP_CONTEXT_RMB = "Deconstruct", ), - ) + + TOOL_WRENCH = list( + SCREENTIP_CONTEXT_RMB = "Anchor/Unanchor", + ), + )) AddElement(/datum/element/contextual_screentip_tools, tool_behaviors) /obj/structure/magic_altar/nature/item_interaction(mob/living/user, obj/item/sacrifice, list/modifiers) @@ -70,3 +76,12 @@ new /obj/item/mana_battery/mana_crystal/standard(get_turf(src), 1) qdel(src) return ITEM_INTERACT_SUCCESS + +/obj/structure/magic_altar/nature/wrench_act(mob/living/user, obj/item/tool) + . = ..() + switch(default_unfasten_wrench(user, tool, 4 SECONDS)) + if(SUCCESSFUL_UNFASTEN) + return ITEM_INTERACT_SUCCESS + if(FAILED_UNFASTEN) + return ITEM_INTERACT_BLOCKING + return .