Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part one of the Magic Rework #501

Merged
merged 100 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
eda0df3
wdawda
nikothedude Jul 17, 2023
0595756
eww
nikothedude Jul 17, 2023
1d01b2d
ghghgh
nikothedude Jul 18, 2023
55fb75c
THE EQUATION
nikothedude Jul 19, 2023
9b9d7e6
dawd
nikothedude Jul 19, 2023
faba49c
wwaddaw
nikothedude Jul 19, 2023
0018637
test
nikothedude Jul 22, 2023
78bed72
awdawd
nikothedude Jul 22, 2023
4f0140d
halfway?
nikothedude Jul 23, 2023
3a1c510
COMPONENT
nikothedude Jul 23, 2023
5ab80b1
WOO
nikothedude Jul 24, 2023
7dd418d
Merge branch 'MrMelbert:master' into magicv2
nikothedude Jul 25, 2023
e691e5f
does the thing
Wollywoger May 19, 2024
f90dc1c
Merge branch 'magicv2' of https://github.com/nikothedude/MapleStation…
Wollywoger May 26, 2024
60aa9b7
Merge branch 'MrMelbert:master' into Magic-Rework-Part-1
Wollywoger May 26, 2024
e609d21
First major commit before draft publish
Wollywoger Jun 11, 2024
a32e096
refactors touch spells, placeholders mana crystals
Wollywoger Jun 13, 2024
4cc85ad
Updates Ice Knifes
Wollywoger Jun 17, 2024
6c619a4
get_mana_required
Wollywoger Jun 18, 2024
ab2fd49
updates water_control
Wollywoger Jun 18, 2024
67332d9
forgot the undefs lol
Wollywoger Jun 18, 2024
dcbf69c
Kills several errors, begins moving component functions
Wollywoger Jun 21, 2024
c97fd98
Snowflakes Touch Spell, gets them up to par.
Wollywoger Jun 21, 2024
d87c18f
corrects proc name
Wollywoger Jun 21, 2024
6f18b4c
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Jul 2, 2024
3bf4832
one line change, oops
Wollywoger Jul 2, 2024
166edb6
Updates Andry's Ice Spells
Wollywoger Jul 2, 2024
b396b96
Forgot freeze person.
Wollywoger Jul 2, 2024
3a56d84
updates soothe and illusion, unticks thaum sense for now
Wollywoger Jul 2, 2024
91081d4
honestly i have no idea. trying to compile here.
Wollywoger Jul 5, 2024
963ce4a
gets it to compile
Wollywoger Jul 12, 2024
c5c7378
switches stuff to atom/movable, returns spell components
Wollywoger Jul 17, 2024
1bb85cb
fix attempt: moves qdel code order for mana pools
Wollywoger Jul 18, 2024
23a985f
bunch of refactors and fixes. still very very unfinished
Wollywoger Jul 22, 2024
14b2acb
minor refactor, begins work on key proc
Wollywoger Jul 31, 2024
ae6664b
saturday's progress. still nothing good
Wollywoger Aug 4, 2024
8391f71
fixes a few issues
Wollywoger Aug 4, 2024
545b094
sunday's shenanigans
Wollywoger Aug 4, 2024
4267efe
i have no idea at this point
Wollywoger Aug 5, 2024
d4fc20f
FIXES THE CANCEL CAST BUG!!!
Wollywoger Aug 6, 2024
e8080da
bandaid fix: is_mana_sufficient "works" now
Wollywoger Aug 6, 2024
bf066ff
gets most things to use "mana_required" instead
Wollywoger Aug 17, 2024
03f5ccc
Gets most spells ACTUALLY up to date. still need to finish touch_comp…
Wollywoger Aug 20, 2024
539c988
*should* finish getting spells up to date.
Wollywoger Aug 21, 2024
0c8fb89
nvm finger_flame still needs to be updated
Wollywoger Aug 21, 2024
0cdd07c
actually fixes finger flame
Wollywoger Aug 21, 2024
065d299
ok macro call
Wollywoger Aug 22, 2024
47eafa3
fixes a linter, soothe now has its cost system re-added
Wollywoger Aug 22, 2024
c386d1f
fixes some issues, begins tests on thaumatergic sense
Wollywoger Aug 24, 2024
92b0ca3
comments thaumatergic sense back out
Wollywoger Aug 24, 2024
2efff6b
kills an unused variable
Wollywoger Aug 24, 2024
3a4f93c
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Aug 24, 2024
2b93ad8
mild fixes, adds the first mana crystal
Wollywoger Aug 24, 2024
79df679
finished mana crystal sprites for now, minor text changes
Wollywoger Aug 25, 2024
d2f9533
reworks and finishes crystals.
Wollywoger Sep 7, 2024
7c7bf54
bunch of updates, adds quintessence, non-module changes some plants
Wollywoger Sep 7, 2024
ea4cd65
removes accidental redeclares
Wollywoger Sep 7, 2024
787a43e
minor crystal/pool fix and refactor, adds mana_stars, adding the seco…
Wollywoger Sep 8, 2024
8534fb2
adds the ability to wear the mana star, adds cargo crates for volite.
Wollywoger Sep 8, 2024
ac0986e
adds mana lens + associated tech
Wollywoger Sep 8, 2024
74d0d29
fixes mana stars, adds meditation
Wollywoger Sep 8, 2024
7dde8ad
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Sep 8, 2024
ea628a5
removes belt flags for mana lens
Wollywoger Sep 8, 2024
32be5b7
Merge branch 'Magic-Rework-Part-1' of https://www.github.com/wollywog…
Wollywoger Sep 8, 2024
46e255d
results of regression testing, every spell should work now, pending r…
Wollywoger Sep 9, 2024
78d1dbc
fixes the names on the reagent plant genes
Wollywoger Sep 11, 2024
cb5c4bd
HOTFIX: fixes the amulet crafting recipe & partially fixes the batter…
Wollywoger Sep 17, 2024
67b4122
fixes the mana crystal bug, adds a feature to allow drawing mana from…
Wollywoger Sep 18, 2024
bab8eb2
fixes the run time when clicking on a turf with the mana lens
Wollywoger Sep 18, 2024
8bcb13b
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Sep 20, 2024
2245210
adds mana sense, no idea how to do failure feedback properly
Wollywoger Sep 27, 2024
d799f2c
Merge branch 'Magic-Rework-Part-1' of https://www.github.com/wollywog…
Wollywoger Sep 27, 2024
08b617f
adds the ability to see an estimate of your current mana pool amount …
Wollywoger Sep 29, 2024
4d3e3e4
first bits of melbert's review
Wollywoger Oct 2, 2024
ed65459
forgot to untick transmutation.dm
Wollywoger Oct 2, 2024
152eee4
excises get_mana and its nefarious siblings
Wollywoger Oct 2, 2024
1a4c202
balloon alert tweaks, batch 3
Wollywoger Oct 2, 2024
fee9f3e
instances mana batteries' mana pools
Wollywoger Oct 2, 2024
33dead4
fixes the input delay exploit on mana batteries
Wollywoger Oct 4, 2024
997267d
refactored mana adjusts for chems, added "personal_adjust_mana" pod t…
Wollywoger Oct 4, 2024
6613fec
fixes a few errors with the previous refactor
Wollywoger Oct 4, 2024
b7f7bb4
refactors how the mana status is displayed, it now shows in status ta…
Wollywoger Oct 4, 2024
01a00ad
redoes leyline amounts as per request
Wollywoger Oct 5, 2024
9649da3
kills some commented out code, minor tweaks
Wollywoger Oct 5, 2024
920c177
removed toxin power & damage from agnosticine
Wollywoger Oct 5, 2024
f9f6027
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Oct 20, 2024
1e3e76a
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Nov 1, 2024
91313f5
moves the atom movable/init changes to base file
Wollywoger Nov 1, 2024
2e8e2d8
Merge branch 'Magic-Rework-Part-1' of https://www.github.com/wollywog…
Wollywoger Nov 1, 2024
403f690
dummies can't have mana pools any more
Wollywoger Nov 15, 2024
1f72a8b
Apply clean-up suggestions from code review
Wollywoger Nov 15, 2024
a30a85b
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Nov 15, 2024
9d4efd2
deletes a bunch of commented out code and unuseds
Wollywoger Nov 15, 2024
13ac836
Merge branch 'Magic-Rework-Part-1' of https://www.github.com/wollywog…
Wollywoger Nov 15, 2024
cc7885e
adds missing documentation on critical procs
Wollywoger Nov 15, 2024
612c7a5
running a test: demodularizes mana_pool destroy.
Wollywoger Nov 20, 2024
2b70a57
removes an unused proc, fixes the do-after for meditate, buffs medita…
Wollywoger Nov 21, 2024
914b49d
makes it compile, fixes the errors
Wollywoger Nov 21, 2024
fa0e9dc
local man forgets to call parent in a proc
Wollywoger Nov 21, 2024
0d41281
Merge branch 'master' into Magic-Rework-Part-1
Wollywoger Nov 22, 2024
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
7 changes: 7 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
if(MOVABLE_LIGHT_BEAM)
AddComponent(/datum/component/overlay_lighting, is_directional = TRUE, is_beam = TRUE)

// HUGE NON-MODULE CHANGE
if (has_initial_mana_pool && can_have_mana_pool())
mana_pool = initialize_mana_pool()
// END NON-MODULE CHANGE

/atom/movable/Destroy(force)
QDEL_NULL(language_holder)
QDEL_NULL(em_block)
Expand Down Expand Up @@ -240,6 +245,8 @@
if (length(vis_contents))
vis_contents.Cut()

QDEL_NULL(mana_pool) // MAJOR NON-MODULE CHANGE

/atom/movable/proc/update_emissive_block()
// This one is incredible.
// `if (x) else { /* code */ }` is surprisingly fast, and it's faster than a switch, which is seemingly not a jump table.
Expand Down
4 changes: 2 additions & 2 deletions code/modules/hydroponics/grown/flowers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
icon_grow = "moonflower-grow"
icon_dead = "sunflower-dead"
product = /obj/item/food/grown/moonflower
genes = list(/datum/plant_gene/trait/glow/purple, /datum/plant_gene/trait/preserved)
genes = list(/datum/plant_gene/trait/glow/purple, /datum/plant_gene/trait/preserved, /datum/plant_gene/reagent/misty_quintessence) // NON-MODULE CHANGE
mutatelist = null
reagents_add = list(/datum/reagent/consumable/ethanol/moonshine = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.02)
rarity = 15
Expand Down Expand Up @@ -334,7 +334,7 @@
potency = 15
instability = 3
growthstages = 3
genes = list(/datum/plant_gene/reagent/preset/carbon, /datum/plant_gene/trait/preserved)
genes = list(/datum/plant_gene/reagent/preset/carbon, /datum/plant_gene/trait/preserved, /datum/plant_gene/reagent/agnosticine) // NON-MODULE CHANGE
growing_icon = 'icons/obj/service/hydroponics/growing_flowers.dmi'
icon_grow = "carbonrose-grow"
icon_dead = "carbonrose-dead"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/grown/melon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
species = "holymelon"
plantname = "Holy Melon Vines"
product = /obj/item/food/grown/holymelon
genes = list(/datum/plant_gene/trait/glow/yellow, /datum/plant_gene/trait/anti_magic)
genes = list(/datum/plant_gene/trait/glow/yellow, /datum/plant_gene/trait/anti_magic, /datum/plant_gene/reagent/foggy_agnosticine) // NON-MODULE CHANGE
mutatelist = null
reagents_add = list(/datum/reagent/water/holywater = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
rarity = PLANT_MODERATELY_RARE
Expand Down
4 changes: 2 additions & 2 deletions code/modules/hydroponics/grown/mushrooms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
icon_dead = "shadowshroom-dead"
plantname = "Shadowshrooms"
product = /obj/item/food/grown/mushroom/glowshroom/shadowshroom
genes = list(/datum/plant_gene/trait/glow/shadow, /datum/plant_gene/trait/plant_type/fungal_metabolism)
genes = list(/datum/plant_gene/trait/glow/shadow, /datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/reagent/fading_agnosticine) // NON-MODULE CHANGE
mutatelist = null
reagents_add = list(/datum/reagent/uranium/radium = 0.2, /datum/reagent/consumable/nutriment = 0.04)
rarity = 30
Expand Down Expand Up @@ -347,7 +347,7 @@
instability = 65
growthstages = 3
product = /obj/item/food/grown/mushroom/odious_puffball
genes = list(/datum/plant_gene/trait/smoke, /datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/squash)
genes = list(/datum/plant_gene/trait/smoke, /datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/squash, /datum/plant_gene/reagent/agnosticine) // NON-MODULE CHANGE
reagents_add = list(/datum/reagent/toxin/spore = 0.2, /datum/reagent/consumable/nutriment = 0.04)
rarity = 35
graft_gene = /datum/plant_gene/trait/smoke
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/grown/peas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
growthstages = 3
icon_grow = "worldpeas-grow"
icon_dead = "worldpeas-dead"
genes = list (/datum/plant_gene/trait/glow/blue)
genes = list (/datum/plant_gene/trait/glow/blue, /datum/plant_gene/reagent/crystalized_quintessence) // NON-MODULE CHANGE
reagents_add = list (/datum/reagent/pax = 0.1, /datum/reagent/drug/happiness = 0.1, /datum/reagent/consumable/nutriment = 0.15)
rarity = 50 // This absolutely will make even the most hardened Syndicate Operators relax.
graft_gene = /datum/plant_gene/trait/glow/blue
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/grown/plum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
species = "plumb"
plantname = "Plumb Tree"
product = /obj/item/food/grown/plum/plumb
genes = list(/datum/plant_gene/trait/repeated_harvest)
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/reagent/foggy_agnosticine) // NON-MODULE CHANGE
mutatelist = null
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1, /datum/reagent/lead = 0.04)
rarity = 30
Expand Down
1 change: 1 addition & 0 deletions code/modules/hydroponics/grown/tea_coffee.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
species = "teaastra"
plantname = "Tea Astra Plant"
product = /obj/item/food/grown/tea/astra
genes = list(/datum/plant_gene/reagent/quintessence) // NON-MODULE CHANGE
mutatelist = null
reagents_add = list(/datum/reagent/medicine/synaptizine = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/toxin/teapowder = 0.1)
rarity = PLANT_MODERATELY_RARE
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mining/lavaland/ash_flora.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
production = 6
yield = 3
growthstages = 4
genes = list(/datum/plant_gene/trait/sticky, /datum/plant_gene/trait/stinging)
genes = list(/datum/plant_gene/trait/sticky, /datum/plant_gene/trait/stinging, /datum/plant_gene/reagent/quintessence) // NON-MODULE CHANGE
graft_gene = /datum/plant_gene/trait/sticky
growing_icon = 'icons/obj/service/hydroponics/growing_vegetables.dmi'
reagents_add = list(/datum/reagent/water = 0.08, /datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/c2/helbital = 0.05)
Expand Down Expand Up @@ -375,7 +375,7 @@
species = "fireblossom"
growthstages = 3
product = /obj/item/food/grown/ash_flora/fireblossom
genes = list(/datum/plant_gene/trait/fire_resistance, /datum/plant_gene/trait/glow/yellow)
genes = list(/datum/plant_gene/trait/fire_resistance, /datum/plant_gene/trait/glow/yellow, /datum/plant_gene/reagent/misty_quintessence) // NON-MODULE CHANGE
growing_icon = 'icons/obj/service/hydroponics/growing_flowers.dmi'
reagents_add = list(/datum/reagent/consumable/tinlux = 0.04, /datum/reagent/consumable/nutriment = 0.03, /datum/reagent/carbon = 0.05)

Expand Down
25 changes: 18 additions & 7 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6077,7 +6077,11 @@
#include "maplestation_modules\code\__DEFINES\traits.dm"
#include "maplestation_modules\code\__DEFINES\vv.dm"
#include "maplestation_modules\code\__DEFINES\magic\attunements.dm"
#include "maplestation_modules\code\__DEFINES\magic\magic_bitflags.dm"
#include "maplestation_modules\code\__DEFINES\magic\magic_defines.dm"
#include "maplestation_modules\code\__DEFINES\magic\magic_signals.dm"
#include "maplestation_modules\code\__DEFINES\magic\mana_charge_bitflags.dm"
#include "maplestation_modules\code\__DEFINES\magic\mana_pool_process_bitflags.dm"
#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"
Expand Down Expand Up @@ -6165,6 +6169,7 @@
#include "maplestation_modules\code\game\objects\items\devices\radio\encryptionkey.dm"
#include "maplestation_modules\code\game\objects\items\devices\radio\headset.dm"
#include "maplestation_modules\code\game\objects\items\devices\scanners\autopsy_scanner.dm"
#include "maplestation_modules\code\game\objects\items\devices\scanners\mana_lens.dm"
#include "maplestation_modules\code\game\objects\items\other_loadout_items\loadout_inhand_items.dm"
#include "maplestation_modules\code\game\objects\items\other_loadout_items\loadout_pocket_items.dm"
#include "maplestation_modules\code\game\objects\items\storage\belt.dm"
Expand Down Expand Up @@ -6331,6 +6336,7 @@
#include "maplestation_modules\code\modules\food_and_drinks\recipes\drinks_recipes.dm"
#include "maplestation_modules\code\modules\food_and_drinks\recipes\food\egg_recipes.dm"
#include "maplestation_modules\code\modules\hydroponics\hydroponics.dm"
#include "maplestation_modules\code\modules\hydroponics\plant_genes.dm"
#include "maplestation_modules\code\modules\jobs\job_types\_job.dm"
#include "maplestation_modules\code\modules\jobs\job_types\asset_protection.dm"
#include "maplestation_modules\code\modules\jobs\job_types\assistant.dm"
Expand Down Expand Up @@ -6372,17 +6378,20 @@
#include "maplestation_modules\code\modules\loadouts\loadout_ui\limbs.dm"
#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\attunement.dm"
#include "maplestation_modules\code\modules\magic\magic.dm"
#include "maplestation_modules\code\modules\magic\magic_subsystem.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\mana.dm"
#include "maplestation_modules\code\modules\magic\mana\misc_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\transmutation.dm"
#include "maplestation_modules\code\modules\magic\mana\sources\leylines\leyline_intensities.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"
Expand All @@ -6394,13 +6403,15 @@
#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\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\shock_touch.dm"
#include "maplestation_modules\code\modules\magic\story_spells\soothe.dm"
#include "maplestation_modules\code\modules\magic\story_spells\thaumatergic_sense.dm"
#include "maplestation_modules\code\modules\magic\story_spells\water_control.dm"
#include "maplestation_modules\code\modules\magic\story_spells\components\pointed_component.dm"
#include "maplestation_modules\code\modules\magic\story_spells\components\story_spell_component.dm"
#include "maplestation_modules\code\modules\magic\story_spells\components\touch_component.dm"
#include "maplestation_modules\code\modules\magic\subsystems\magic_subsystem.dm"
#include "maplestation_modules\code\modules\mining\mining_redemption.dm"
#include "maplestation_modules\code\modules\mining\order_consumables.dm"
#include "maplestation_modules\code\modules\mining\ores_coins.dm"
Expand Down
3 changes: 3 additions & 0 deletions maplestation_modules/code/__DEFINES/magic/attunements.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#define MAGIC_ELEMENT_ICE /datum/attunement/ice
#define MAGIC_ELEMENT_LIGHT /datum/attunement/light
#define MAGIC_ELEMENT_WIND /datum/attunement/wind
#define MAGIC_ELEMENT_LIFE /datum/attunement/life
#define MAGIC_ELEMENT_EARTH /datum/attunement/earth
#define MAGIC_ELEMENT_ELECTRIC /datum/attunement/electric
// When other elements are used, add them here

// Alignments
Expand Down
11 changes: 11 additions & 0 deletions maplestation_modules/code/__DEFINES/magic/magic_bitflags.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#define NO_MANA_POOL (1<<0)
#define MANA_POOL_FULL (1<<1)

#define MANA_POOL_TRANSFER_START (1<<2)
#define MANA_POOL_TRANSFER_STOP (1<<3)

#define MANA_POOL_ALREADY_TRANSFERRING (1<<4)
#define MANA_POOL_CANNOT_TRANSFER (1<<5)

#define MANA_POOL_TRANSFER_SKIP_ACTIVE (1<<6)
49 changes: 44 additions & 5 deletions maplestation_modules/code/__DEFINES/magic/magic_defines.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
/// Magic

#define BASE_STORY_MAGIC_CAST_COST_MULT 1
#define NO_CATALYST_COST_MULT 4

// Assumes we are at average leyline intensity
#define LEYLINE_BASE_CAPACITY 600
#define LEYLINE_BASE_RECHARGE 2 // Per second, we recharge this much mana
#define LEYLINE_BASE_RECHARGE 0.1 // Per second, we recharge this much man

#define MANA_CRYSTAL_BASE_HARDCAP 200
#define MANA_CRYSTAL_BASE_RECHARGE 0.001

#define BASE_MANA_CAPACITY 1000
#define MANA_CRYSTAL_BASE_MANA_CAPACITY (BASE_MANA_CAPACITY * 0.2)
#define CARBON_BASE_MANA_CAPACITY (BASE_MANA_CAPACITY)
#define LEYLINE_BASE_CAPACITY 600 //todo: standardize

#define BASE_MANA_SOFTCAP (BASE_MANA_CAPACITY * 0.2) //20 percent
#define BASE_MANA_CRYSTAL_SOFTCAP MANA_CRYSTAL_BASE_MANA_CAPACITY
#define BASE_CARBON_MANA_SOFTCAP (CARBON_BASE_MANA_CAPACITY * 0.2)

#define BASE_MANA_OVERLOAD_THRESHOLD (BASE_MANA_CAPACITY * 0.9)
#define MANA_CRYSTAL_OVERLOAD_THRESHOLD MANA_CRYSTAL_BASE_MANA_CAPACITY
#define CARBON_MANA_OVERLOAD_THRESHOLD BASE_CARBON_MANA_SOFTCAP

#define BASE_MANA_OVERLOAD_COEFFICIENT 1
#define MANA_CRYSTAL_OVERLOAD_COEFFICIENT 0.1
#define CARBON_MANA_OVERLOAD_COEFFICIENT 2

#define ROBOTIC_MANA_OVERLOAD_COEFFICIENT_MULT 3
#define ROBOTIC_MANA_SOFTCAP_MULT 0.5
#define ROBOTIC_MANA_OVERLOAD_THRESHOLD_MULT ROBOTIC_MANA_SOFTCAP_MULT

#define MANA_OVERLOAD_DAMAGE_THRESHOLD 2
#define MANA_OVERLOAD_BASE_DAMAGE 1

// inverse - higher numbers decrease the intensity of the decay
#define BASE_MANA_EXPONENTIAL_DIVISOR 60 // careful with this value - low numbers will cause some fuckery
#define BASE_CARBON_MANA_EXPONENTIAL_DIVISOR (BASE_MANA_EXPONENTIAL_DIVISOR * 0.5)
#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_CRYSTAL_DONATION_RATE (BASE_MANA_DONATION_RATE * 0.1)
#define BASE_LEYLINE_DONATION_RATE 30

#define MANA_BATTERY_MAX_TRANSFER_DISTANCE 3

#define MAGIC_MATERIAL_NAME "Volite"
#define MAGIC_UNIT_OF_MEASUREMENT "Vol"
Expand All @@ -17,3 +52,7 @@
#define THAUMATERGIC_SENSE_POOL_DISCERNMENT_LEVEL_ZERO 0
#define THAUMATERGIC_SENSE_POOL_DISCERNMENT_LEVEL_ONE 1
#define THAUMATERGIC_SENSE_POOL_DISCERNMENT_LEVEL_TWO 2

// MAGIC TRAITS GO HERE
// give this to an object to declare that its pool can be used during cast.
#define TRAIT_POOL_AVAILABLE_FOR_CAST "pool_available_for_cast"
2 changes: 2 additions & 0 deletions maplestation_modules/code/__DEFINES/magic/magic_signals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define COMSIG_MANA_POOL_INTRINSIC_RECHARGE_UPDATE "mana_pool_intrinsic_recharge_update"
#define COMSIG_ATOM_MANA_POOL_CHANGED "atom_mana_pool_changed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#define MANA_ALL_LEYLINES (1<<1)

#define MANA_DISPERSE_EVENLY 1
#define MANA_SEQUENTIAL 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define MANA_POOL_SKIP_NEXT_TRANSFER (1<<0)
#define MANA_POOL_INTRINSIC (1<<1)
11 changes: 11 additions & 0 deletions maplestation_modules/code/datums/components/crafting/recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@
tool_behaviors = list(TOOL_WELDER, TOOL_SCREWDRIVER, TOOL_WRENCH)
time = 2 SECONDS
category = CAT_WEAPON_MELEE

/datum/crafting_recipe/volite_amulet
name = "Volite Amulet"
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
)
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 5 SECONDS
category = CAT_EQUIPMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// as of part one, this is just for the prototype. more will be added with higher report detail/verbosity
/obj/item/mana_lens
name = "Prototype Mana Lens"
icon = 'maplestation_modules/icons/obj/devices.dmi'
icon_state = "mana_lens"
desc = "A prototypical device used to read out the current amount of mana within a subject. The ergonomics are terrible."
item_flags = NOBLUDGEON
throwforce = 3
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
drop_sound = 'maplestation_modules/sound/items/drop/device2.ogg'
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
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
)
32 changes: 32 additions & 0 deletions maplestation_modules/code/modules/cargo/goodies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,35 @@
cost = PAYCHECK_CREW * 4
crate_type = /obj/structure/closet/crate/critter
contains = list(/obj/item/toy/plush/peepy)

/datum/supply_pack/goody/cut_volite
name = "Cut Volite Gemstone"
desc = "An expertly cut volite gemstone, ready to be socketed into an amulet."
cost = PAYCHECK_CREW * 5
contains = list(
/obj/item/mana_battery/mana_crystal/cut,
)

/datum/supply_pack/goody/mana_star
name = "Pre-Assembled Volite Amulet"
desc = "A volite gemstone pre-cut and placed within an amulet, saving you the hassle."
cost = PAYCHECK_CREW * 8
contains = list(
/obj/item/clothing/neck/mana_star,
)

/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.
cost = PAYCHECK_CREW * 4
contains = list(
/obj/item/mana_battery/mana_crystal/standard,
)

/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
cost = PAYCHECK_CREW * 2
contains = list(
/obj/item/mana_battery/mana_crystal/small,
)
Loading
Loading