Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
9b4656c
merges spells into one tab
Wollywoger Jan 6, 2025
77b2f34
first commit, changes meditation
Wollywoger Jun 1, 2025
679a8f5
first main commit
Wollywoger Jul 7, 2025
df52f81
Merge branch 'MrMelbert:master' into magic-rework-part-2
Wollywoger Jul 7, 2025
08b35f7
progress
Wollywoger Jul 8, 2025
fd84b69
just comitting this to checkout, wands
Wollywoger Jul 9, 2025
8544660
big changes, first version of wands
Wollywoger Jul 24, 2025
5d67a50
dme
Wollywoger Jul 24, 2025
de54ad1
temporarily disables a feature so it can compiles
Wollywoger Jul 24, 2025
b4db2c2
fixes compilation errors
Wollywoger Jul 24, 2025
c19f184
wand work good
Wollywoger Jul 26, 2025
99c4751
adds the newer spells to the cantrip tab
Wollywoger Jul 26, 2025
97b6d8b
work trying to fix the null index error
Wollywoger Jul 26, 2025
668647d
cleans up stuff from the old tabs, fixes bad index issue
Wollywoger Jul 27, 2025
eec2552
fixes transferrence. Lol.
Wollywoger Jul 28, 2025
d450744
mild changes, first parts of the nature shrine, adds eyes of night to…
Wollywoger Aug 4, 2025
69343c3
fixes eyes of night, makes nature shrine actually work
Wollywoger Aug 25, 2025
4c07453
first bits of work on oculory, refactors nature shrine
Wollywoger Sep 9, 2025
ba9c6d9
manually kills has_mana in the dme
Wollywoger Sep 11, 2025
7a533b0
Merge branch 'master' of https://www.github.com/wollywoger/maplestati…
Wollywoger Oct 26, 2025
01728b7
stellar occulory just works now i guess
Wollywoger Oct 31, 2025
4524932
removes some debug/redundant code
Wollywoger Nov 2, 2025
8df8834
Merge branch 'master' into magic-rework-part-2
Wollywoger Nov 2, 2025
f93beb7
adds in code for alt wands + recipes, updates sprite for occulory
Wollywoger Nov 10, 2025
9d6e91f
Merge branch 'magic-rework-part-2' of https://www.github.com/wollywog…
Wollywoger Nov 10, 2025
3e95ee2
Merge branch 'master' into magic-rework-part-2
Wollywoger Nov 10, 2025
2679d5e
repathing, removes the old aeromancy file, touches up wands
Wollywoger Nov 14, 2025
4976f5e
house keeping surronding magic charge spells, fixes up and adds splat…
Wollywoger Nov 15, 2025
0939796
artificial volite, compile fixes
Wollywoger Nov 15, 2025
fa15d71
department locks the artificial volite recipes
Wollywoger Nov 15, 2025
547299f
adds the techie wand sprite to the game
Wollywoger Nov 18, 2025
10b2757
adds psionic quirk, fixes a runtime
Wollywoger Nov 22, 2025
c2d82e9
changes psionic quirk's icon
Wollywoger Nov 23, 2025
3ea2bbb
adds light breaker
Wollywoger Nov 23, 2025
55c44a5
mild fixes, makes volite powder work
Wollywoger Nov 24, 2025
098e810
occulory changes, fixes volite powder for real
Wollywoger Nov 25, 2025
a8491e5
makes the altars craftable, some maintenance on the designs
Wollywoger Nov 25, 2025
0c6cbdd
typo
Wollywoger Nov 25, 2025
304bb3c
another typo yipee
Wollywoger Nov 26, 2025
de7a9f0
mild oculory fixes & touchups
Wollywoger Nov 26, 2025
d45a952
adds the meditation mat and all its functionality
Wollywoger Nov 26, 2025
2abf19e
Merge branch 'master' into magic-rework-part-2
Wollywoger Nov 27, 2025
63c149b
fixes the typing on meditation mat, which makes it work as intended
Wollywoger Nov 28, 2025
d896f29
Merge branch 'magic-rework-part-2' of https://www.github.com/wollywog…
Wollywoger Nov 28, 2025
f7cc47a
removes some temp code from mana tap
Wollywoger Nov 29, 2025
112627f
don't need that
Wollywoger Nov 29, 2025
dd76001
adds meditation guidebooks and refactors the volitious lignite multipack
Wollywoger Nov 30, 2025
021bdd0
small changes, adds crafting for the mat and better hints at it
Wollywoger Nov 30, 2025
f162a39
mild changes to mana charge spells, fixes a path error in meditation …
Wollywoger Nov 30, 2025
1c21877
minor description/feedback changes from preround
Wollywoger Dec 1, 2025
cd651d4
kills an annoying run time
Wollywoger Dec 1, 2025
40ca4c6
SOMEHOW FIXES LEYLINE TEETERING AND DECIMAL MESSES?????
Wollywoger Dec 5, 2025
ce58a38
adds sprites and better desc to the meditation mat
Wollywoger Dec 7, 2025
34b1ce8
attempted to make early magic tech work, makes it default cause it di…
Wollywoger Dec 7, 2025
5768b82
gets early magic working as intended (thanks jade)
Wollywoger Dec 7, 2025
49f2b08
slight changes to lens and tech wand
Wollywoger Dec 7, 2025
25b1f5f
fixes a number of issues from last night's session
Wollywoger Dec 9, 2025
148d656
fixes dme
Wollywoger Dec 14, 2025
8940e10
minor linter fix
Wollywoger Dec 14, 2025
9d37ab8
Merge branch 'magic-rework-part-2' of https://www.github.com/wollywog…
Wollywoger Dec 14, 2025
e2a5b4b
is this what you want?
Wollywoger Dec 14, 2025
87269d8
housekeeping surronding the meditate family, moves them to a subtype …
Wollywoger Dec 15, 2025
c019f70
disables every pool taking from leylines automatically cause that has…
Wollywoger Dec 28, 2025
ee08f57
completely re-does the ruleset system, drops cost of the ruleset syst…
Wollywoger Jan 7, 2026
31e5723
uhhh lets see if this'll fix it
Wollywoger Jan 8, 2026
fcaa82a
should fix the linter error on the stump, adds anchor/unanchor to the…
Wollywoger Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6298,6 +6298,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"
Expand All @@ -6309,9 +6310,11 @@
#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"
#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"
Expand Down Expand Up @@ -6356,6 +6359,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"
Expand Down Expand Up @@ -6401,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"
Expand Down Expand Up @@ -6515,18 +6520,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_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\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\verbs\looc.dm"
#include "maplestation_modules\code\modules\clothing\digi_clothing.dm"
#include "maplestation_modules\code\modules\clothing\accessories\accessories.dm"
Expand Down Expand Up @@ -6628,32 +6625,39 @@
#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"
#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"
#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\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"
#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"
#include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities\leyline_variable.dm"
#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"
#include "maplestation_modules\code\modules\magic\story_spells\healing_touch.dm"
#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"
#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"
Expand Down Expand Up @@ -6750,12 +6754,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"
Expand Down
3 changes: 3 additions & 0 deletions maplestation_modules/code/__DEFINES/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@

// 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 CIRCUIT_COLOR_MAGIC "#a8ffe2"
2 changes: 2 additions & 0 deletions maplestation_modules/code/__DEFINES/magic/attunements.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@
#define MANA_POOL_CANNOT_TRANSFER (1<<5)

#define MANA_POOL_TRANSFER_SKIP_ACTIVE (1<<6)

/// 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
#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)
5 changes: 3 additions & 2 deletions maplestation_modules/code/__DEFINES/magic/magic_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -36,11 +36,12 @@
#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

#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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +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"
#define SPELLBOOK_CATEGORY_CANTRIPS "Cantrips"
#define SPELLBOOK_CATEGORY_MANIPULATION "Manipulation"
3 changes: 3 additions & 0 deletions maplestation_modules/code/__DEFINES/research/techweb_nodes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define TECHWEB_NODE_ARTIFICIAL_VOLITE "artificial_volite"
#define TECHWEB_NODE_MANA_BASE "mana_base_node"
#define TECHWEB_NODE_STELLAR_OCULORY "stellar_oculory_unlock"
2 changes: 2 additions & 0 deletions maplestation_modules/code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// place for IDs like its base code equivalent
#define MEDITATION_MAT_EFFECT "meditation_mat"
4 changes: 4 additions & 0 deletions maplestation_modules/code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
#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"
/// Used to empower other mental effects, notably the meditate family
#define TRAIT_EMPOWERED_MEDITATION "empowered_meditation"
76 changes: 76 additions & 0 deletions maplestation_modules/code/__HELPERS/object_helpers.dm
Original file line number Diff line number Diff line change
@@ -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
30 changes: 29 additions & 1 deletion maplestation_modules/code/datums/components/crafting/recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,3 +51,30 @@
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 = "Gold-Capped Wooden Wand"
result = /obj/item/magic_wand/wooden
reqs = list(
/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
15 changes: 15 additions & 0 deletions maplestation_modules/code/datums/quirks/_quirk.dm
Original file line number Diff line number Diff line change
@@ -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)

14 changes: 14 additions & 0 deletions maplestation_modules/code/datums/quirks/good.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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_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.")
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



Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,9 @@
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!")
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
)
Loading