Skip to content

Commit

Permalink
Pruning unused anima types, renaming crystalline anima to potentia.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Aug 25, 2024
1 parent 3c4f971 commit 5a02957
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 113 deletions.
4 changes: 2 additions & 2 deletions maps/shaded_hills/shaded_hills_skills.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// ANIMA OVERRIDES
/decl/stack_recipe/anima
/decl/stack_recipe/potentia
recipe_skill = /decl/skill/crafting/artifice

/obj/item/runestone
work_skill = /decl/skill/crafting/artifice

/decl/material/solid/anima
/decl/material/solid/potentia
arcana_skill = SKILL_SCIENCE

/decl/runestone_spell_archetype
Expand Down
2 changes: 1 addition & 1 deletion mods/content/anima/_anima.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
credits_adjectives = list("ANCIENT", "MAGICAL", "ARCANE", "DIVINE", "BEWITCHED", "ENCHANTED")
credits_crew_outcomes = list("BEWITCHED", "ENCHANTED", "MAGICKED", "CURSED")
dreams = list(
"anima", "magic", "an ancient curse", "an arcane ritual",
"anima", "potentia", "magic", "an ancient curse", "an arcane ritual",
"a magic spell", "a magician", "a wizard", "a witch",
"a necromancer", "an ancient scroll", "a magic crystal"
)
4 changes: 2 additions & 2 deletions mods/content/anima/_anima.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define MODPACK_ANIMA
// BEGIN_INCLUDE
#include "_anima.dm"
#include "anima_materials.dm"
#include "anima_stack.dm"
#include "potentia_definition.dm"
#include "potentia_stack.dm"
#include "runestones.dm"
#include "spell_archetypes.dm"
#include "spell_datum.dm"
Expand Down
57 changes: 0 additions & 57 deletions mods/content/anima/anima_stack.dm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/decl/material/solid/anima
name = "anima"
solid_name = "crystalline anima"
/decl/material/solid/potentia
name = "potentia"
solid_name = "crystalline potentia"
uid = "mat_anima"
opacity = 0.7
color = COLOR_GRAY40
abstract_type = /decl/material/solid/anima
abstract_type = /decl/material/solid/potentia
uid = "mat_anima_generic"
var/anima_type = "unaspected"
var/runestone_glow_intensity = 0.3
Expand All @@ -15,33 +15,27 @@
/// Skill used for general spell knowledge.
var/arcana_skill = SKILL_SCIENCE // TODO: arcana or magic skill

/decl/material/solid/anima/Initialize()
name = "[anima_type] anima"
solid_name = "crystalline [anima_type] anima"
liquid_name = "molten [anima_type] anima"
gas_name = "gaseous [anima_type] anima"
/decl/material/solid/potentia/Initialize()
name = "[anima_type] potentia"
solid_name = "crystalline [anima_type] potentia"
liquid_name = "molten [anima_type] potentia"
gas_name = "gaseous [anima_type] potentia"
for(var/spell in cantrips)
cantrips -= spell
cantrips |= GET_DECL(spell)
undirected_spell = GET_DECL(undirected_spell)
return ..()

/decl/material/solid/anima/proc/get_spells()
/decl/material/solid/potentia/proc/get_spells()
return list()

/decl/material/solid/anima/proc/get_cantrips_by_effect_type(mob/user, effect_type)
/decl/material/solid/potentia/proc/get_cantrips_by_effect_type(mob/user, effect_type)
// TODO: check arcana_skill on user
for(var/decl/runestone_spell_archetype/cantrip in cantrips)
if(cantrip.has_effect_type(effect_type))
LAZYDISTINCTADD(., cantrip)

/decl/material/solid/anima/air
anima_type = "air"
color = COLOR_SKY_BLUE
runestone_glow_intensity = 0.6
uid = "mat_anima_air"

/decl/material/solid/anima/fire
/decl/material/solid/potentia/fire
anima_type = "fire"
color = COLOR_ORANGE
runestone_glow_intensity = 0.6
Expand All @@ -51,15 +45,3 @@
)
undirected_spell = /decl/runestone_spell_archetype/flare
uid = "mat_anima_fire"

/decl/material/solid/anima/water
anima_type = "water"
color = COLOR_CYAN
runestone_glow_intensity = 0.6
uid = "mat_anima_water"

/decl/material/solid/anima/stone
anima_type = "stone"
color = COLOR_SILVER
runestone_glow_intensity = 0.6
uid = "mat_anima_stone"
30 changes: 30 additions & 0 deletions mods/content/anima/potentia_stack.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/obj/item/stack/material/potentia
name = "blanks"
desc = "A condensed, crystalline form of magical energy, cut into rough, unworked rounds and ready for etching."
singular_name = "blank"
plural_name = "blanks"
icon_state = "anima"
icon = 'mods/content/anima/icons/anima_blank.dmi'
plural_icon_state = "anima-mult"
max_icon_state = "anima-max"
stack_merge_type = /obj/item/stack/material/potentia
crafting_stack_type = /obj/item/stack/material/potentia
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC
max_amount = 5

/obj/item/stack/material/potentia/mapped/fire
amount = 1
material = /decl/material/solid/potentia/fire
is_spawnable_type = TRUE

/obj/item/stack/material/potentia/mapped/fire/five
name = "5 fire potentia blanks"
amount = 5

/decl/stack_recipe/anima
abstract_type = /decl/stack_recipe/anima
craft_stack_types = /obj/item/stack/material/potentia
required_material = /decl/material/solid/potentia

/decl/stack_recipe/anima/runestone
result_type = /obj/item/runestone
29 changes: 10 additions & 19 deletions mods/content/anima/runestones.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "An etched, faceted round of crystalline anima, scribed with a complex rune. Shatter the runestone to evoke the spell scribed upon it."
icon = 'mods/content/anima/icons/runestone_basic.dmi'
icon_state = ICON_STATE_WORLD
material = /decl/material/solid/anima
material = /decl/material/solid/potentia
w_class = ITEM_SIZE_SMALL
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_DESC

Expand All @@ -29,7 +29,7 @@
if(cracked)
new_name += "cracked"
new_name += anima_density_labels[icon]
var/decl/material/solid/anima/anima = material
var/decl/material/solid/potentia/anima = material
new_name += istype(anima) ? anima.anima_type : "unaspected"
new_name += initial(name)
if(stored_spell)
Expand All @@ -53,7 +53,7 @@
if(try_scribe_spell(user, W))
return TRUE

if(istype(W, /obj/item/stack/material/anima) && W.material)
if(istype(W, /obj/item/stack/material/potentia) && W.material)

if(W.material.type != material.type)
to_chat(user, SPAN_WARNING("\The [src] is made of [material], not [W.material]."))
Expand All @@ -63,7 +63,7 @@
to_chat(user, SPAN_WARNING("\The [src] is as pure and dense as it can be without shattering."))
return TRUE

var/obj/item/stack/material/anima/anima = W
var/obj/item/stack/material/potentia/anima = W
if(anima.get_amount() < anima_density)
to_chat(user, SPAN_WARNING("You need at least [anima_density] blank\s to refine \the [src] further."))
return TRUE
Expand Down Expand Up @@ -107,7 +107,7 @@

// Incomplete runestones or AOE spells are activated immediately.
if(!stored_spell?.spell_master)
var/decl/material/solid/anima/anima = material
var/decl/material/solid/potentia/anima = material
if(istype(anima) && anima.undirected_spell?.base_effect)
anima.undirected_spell.base_effect.evoke_spell(user, get_turf(user), null, deliberate = deliberate)
else
Expand Down Expand Up @@ -137,22 +137,13 @@
return ..()

/obj/item/runestone/fire
material = /decl/material/solid/anima/fire

/obj/item/runestone/water
material = /decl/material/solid/anima/water

/obj/item/runestone/air
material = /decl/material/solid/anima/air

/obj/item/runestone/stone
material = /decl/material/solid/anima/stone
material = /decl/material/solid/potentia/fire

/obj/item/runestone/adjust_mob_overlay(mob/living/user_mob, bodytype, image/overlay, slot, bodypart, use_fallback_if_icon_missing = TRUE)
if(overlay && cracked && istype(material, /decl/material/solid/anima))
if(overlay && cracked && istype(material, /decl/material/solid/potentia))
var/check_state = "[overlay.icon_state]-glow"
if(check_state_in_icon(check_state, overlay.icon))
var/decl/material/solid/anima/anima_mat = material
var/decl/material/solid/potentia/anima_mat = material
var/image/I = image(overlay.icon, check_state)
I.alpha = 255 * anima_mat.runestone_glow_intensity
I.appearance_flags |= RESET_ALPHA
Expand All @@ -169,8 +160,8 @@
icon_state = get_world_inventory_state()
if(cracked)
icon_state = "[icon_state]-cracked"
if(istype(material, /decl/material/solid/anima))
var/decl/material/solid/anima/anima_mat = material
if(istype(material, /decl/material/solid/potentia))
var/decl/material/solid/potentia/anima_mat = material
var/image/I = image(icon, "[icon_state]-glow")
I.alpha = 255 * anima_mat.runestone_glow_intensity
I.appearance_flags |= RESET_ALPHA
Expand Down
4 changes: 2 additions & 2 deletions mods/content/anima/spellscribing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/obj/item/runestone/proc/can_scribe(mob/user, obj/item/implement)
if(!istype(user) || QDELETED(user) || (loc != user && !user.Adjacent(src)) || user.incapacitated())
return FALSE
if(!istype(material, /decl/material/solid/anima) || QDELETED(src) || cracked)
if(!istype(material, /decl/material/solid/potentia) || QDELETED(src) || cracked)
return FALSE
if(work_tool && !IS_TOOL(implement, work_tool))
return FALSE
Expand All @@ -42,7 +42,7 @@
return FALSE

. = TRUE // We mostly don't care after this point. Return type is only used for attackby() return.
var/decl/material/solid/anima/anima_mat = material
var/decl/material/solid/potentia/anima_mat = material

// Stage one: choose range.
if(!stored_spell)
Expand Down

0 comments on commit 5a02957

Please sign in to comment.