Skip to content

Commit

Permalink
Ring of Manaweaving
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 4, 2024
1 parent 0097cbf commit ccd81e5
Show file tree
Hide file tree
Showing 31 changed files with 271 additions and 173 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ build
# other
eclipse
run
run-data
logs

# Files from Forge MDK
forge*changelog.txt
/run-data/logs/
/src/generated/resources/.cache/
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ dependencies {
compileOnly(fg.deobf("curse.maven:farmers_delight-398521:4638874"))

runtimeOnly(fg.deobf("curse.maven:create-328085:4626108"))
//implementation(fg.deobf("curse.maven:jeed-532286:4599236"))
implementation(fg.deobf("curse.maven:mutil-351914:4824501"))
implementation(fg.deobf("curse.maven:tetra-289712:5544287"))
compileOnly(fg.deobf("curse.maven:mutil-351914:4824501"))
compileOnly(fg.deobf("curse.maven:tetra-289712:5544287"))


implementation(fg.deobf("curse.maven:placebo-283644:5414631"))
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ modLicense=All Rights Reserved
modGroupId=com.sammy.malum
modAuthors=Sammy Semicolon
modDescription=A dark magic mod focused on soul and spirit magic.
lodestoneVersion=1.6.2.233
lodestoneVersion=1.6.3.233
jeiVersion=15.2.0.22
curiosVersion=5.7.1+1.20.1
fusionVersion=1.1.1
20 changes: 18 additions & 2 deletions src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"attribute.name.malum.arcane_resonance": "Arcane Resonance",
"attribute.name.malum.arcane_resonance.desc": "Bonus potency for spirit-collection effects",
"attribute.name.malum.malignant_conversion": "Malignant Conversion",
"attribute.name.malum.malignant_conversion.desc": "A percentile conversion rate in which certain magical attributes are converted into armor, armor toughness and magic resistance",
"attribute.name.malum.reserve_staff_charges": "Reserve Staff Charges",
"attribute.name.malum.reserve_staff_charges.desc": "A capacity for extra staff charges, replenished overtime, consumed when casting.",
"attribute.name.malum.scythe_proficiency": "Scythe Proficiency",
"attribute.name.malum.scythe_proficiency.desc": "Damage multiplier for Scythes",
"attribute.name.malum.soul_ward_capacity": "Soul Ward Capacity",
"attribute.name.malum.soul_ward_capacity.desc": "The capacity for Soul Ward",
"attribute.name.malum.soul_ward_integrity": "Soul Ward Integrity",
"attribute.name.malum.soul_ward_integrity.desc": "A percentile increase in durability for Soul Ward",
"attribute.name.malum.soul_ward_recovery_rate": "Soul Ward Recovery Rate",
"attribute.name.malum.soul_ward_strength": "Soul Ward Strength",
"attribute.name.malum.soul_ward_recovery_rate.desc": "A percentile increase in recovery rate for Soul Ward",
"attribute.name.malum.spirit_spoils": "Spirit Spoils",
"attribute.name.malum.spirit_spoils.desc": "Flat increase to spirits looted from slain foes",
"block.malum.aerial_spirited_glass": "Aerial Spirited Glass",
"block.malum.aqueous_spirited_glass": "Aqueous Spirited Glass",
"block.malum.arcane_spirited_glass": "Arcane Spirited Glass",
Expand Down Expand Up @@ -301,13 +309,15 @@
"effect.malum.anglers_lure": "Angler's Lure",
"effect.malum.anglers_lure.description": "Let any fish who meets my gaze learn the true meaning of fear; for I am the harbinger of death. The bane of creatures sub-aqueous, my rod is true and unwavering as I cast into the aquatic abyss. A man, scorned by this uncaring Earth, finds solace in the sea. My only friend, the worm upon my hook. Wriggling, writhing, struggling to surmount the mortal pointlessness that permeates this barren world. I am alone. I am empty. And yet, I fish.",
"effect.malum.cancerous_growth": "Cancerous Growth",
"effect.malum.cancerous_growth.description": "You are emboldened by uncontrolled growth, increasing maximum health.",
"effect.malum.earthen_might": "Earthen Might",
"effect.malum.earthen_might.description": "Your fists and tools are reinforced with earth, increasing your overall damage.",
"effect.malum.gaias_bulwark": "Gaias Bulwark",
"effect.malum.gaias_bulwark.description": "You are protected by an earthen bulwark, increasing your armor.",
"effect.malum.gluttony": "Gluttony",
"effect.malum.gluttony.description": "You feed on the vulnerable, increasing scythe proficiency and gradually restoring lost hunger.",
"effect.malum.grim_certainty": "Grim Certainty",
"effect.malum.grim_certainty.description": "The Weight of Worlds oscillates, sealing the next strike as a critical blow.",
"effect.malum.ifrits_embrace": "Ifrit's Embrace",
"effect.malum.ifrits_embrace.description": "The warm embrace of fire coats your soul, mending your seared scars.",
"effect.malum.miners_rage": "Miner's Rage",
Expand All @@ -318,7 +328,9 @@
"effect.malum.rejected": "Rejected",
"effect.malum.sacrificial_empowerment": "Sacrificial Empowerment",
"effect.malum.silenced": "Silenced",
"effect.malum.silenced.description": "You are silenced, leaving your magical capabilities neutered.",
"effect.malum.wicked_intent": "Wicked Intent",
"effect.malum.wicked_intent.description": "You bring forth a powerful counter attack, increasing scythe proficiency for just one strike.",
"effect.malum.zephyrs_courage": "Zephyr's Courage",
"effect.malum.zephyrs_courage.description": "The zephyr propels you forward, increasing your movement speed.",
"enchantment.malum.haunted": "Haunted",
Expand Down Expand Up @@ -481,6 +493,7 @@
"item.malum.ring_of_esoteric_spoils": "Ring of Esoteric Spoils",
"item.malum.ring_of_growing_flesh": "Ring of Growing Flesh",
"item.malum.ring_of_gruesome_concentration": "Ring of Gruesome Concentration",
"item.malum.ring_of_manaweaving": "Ring of Manaweaving",
"item.malum.ring_of_the_demolitionist": "Ring of the Demolitionist",
"item.malum.ring_of_the_endless_well": "Ring of the Endless Well",
"item.malum.ring_of_the_hoarder": "Ring of the Hoarder",
Expand Down Expand Up @@ -754,6 +767,7 @@
"malum.gui.book.entry.page.headline.prismatic_focus_lens": "Prismatic Focus Lens",
"malum.gui.book.entry.page.headline.reactive_trinkets.ring_of_alchemical_mastery": "Ring of Alchemical Mastery",
"malum.gui.book.entry.page.headline.reactive_trinkets.ring_of_curative_talent": "Ring of Curative Talent",
"malum.gui.book.entry.page.headline.reactive_trinkets.ring_of_manaweaving": "Ring of Manaweaving",
"malum.gui.book.entry.page.headline.reactive_trinkets.ring_of_prowess": "Ring of Prowess",
"malum.gui.book.entry.page.headline.ring_of_esoteric_spoils": "Ring of Esoteric Spoils",
"malum.gui.book.entry.page.headline.ritual_magic": "Ritual magic",
Expand Down Expand Up @@ -1005,6 +1019,7 @@
"malum.gui.book.entry.page.text.prismatic_focus_lens.1": "Sometimes, simplicity is the best goal. The Prismatic Focus Lens bends not light, but the flow of arcana, reducing instability of the spirit focusing process. It is important to note, stability can only prevent the impetus from suffering $iadditional/$ damage.",
"malum.gui.book.entry.page.text.reactive_trinkets.ring_of_alchemical_mastery.1": "This ring, through alchemical trickery, is able to manipulate the potions running through my blood. Whenever I collect arcana, the ring will partially filter out negative effects, while at the same time prolonging positive ones.",
"malum.gui.book.entry.page.text.reactive_trinkets.ring_of_curative_talent.1": "The trinkets documented within cause effects whenever a spirit crystal is collected, feeding off the excess energy. As an example, this restorative trinket will replenish a small division of my health any time I collect arcana.",
"malum.gui.book.entry.page.text.reactive_trinkets.ring_of_manaweaving.1": "Soul Ward is a powerful barrier, but in it's current state it leaves much to be desired. One of it's glaring issues is the burdensome recovery time. I've designed a ring which, whenever I collect arcana, will accelerate the recovery process of Soul Ward.",
"malum.gui.book.entry.page.text.reactive_trinkets.ring_of_prowess.1": "Brilliance is attached to the soul, but isn't an impulse like the arcana. It is accumulated knowledge, and so is not inherently tied to the soul that learned it. Even strikes which pass through the soul harmlessly are capable of dislodging it.",
"malum.gui.book.entry.page.text.reactive_trinkets.ring_of_prowess.2": "By using condensed Brilliance, I have created a ring that filters out that Brilliance out of arcana I collect, giving me a burst of Brilliant knowledge whenever I collect arcana.",
"malum.gui.book.entry.page.text.ring_of_esoteric_spoils.1": "It can be tiring, harvesting the sheer quantities of arcana I need for my research. This ring can increase the efficiency of the harvest, allowing me to reap an additional spirit from every slain soul. At a certain point, though, \"efficiency\" ceases to explain it. How am I obtaining more power than the soul itself has?",
Expand Down Expand Up @@ -1394,6 +1409,7 @@
"malum.gui.curio.effect.spirits_extend_effect": "Spirit Collection Aids Potion Durations",
"malum.gui.curio.effect.spirits_gluttony": "Spirit Collection Generates Gluttony",
"malum.gui.curio.effect.spirits_heal": "Spirit Collection Replenishes Health",
"malum.gui.curio.effect.spirits_weave_mana": "Spirit Collection Recovers Soul Ward",
"malum.gui.curio.effect.spirits_xp": "Spirit Collection Generates Experience Points",
"malum.gui.curio.negative": "-%s",
"malum.gui.curio.positive": "+%s",
Expand Down Expand Up @@ -1661,7 +1677,7 @@
"malum.subtitle.voracious_ring_feeds": "Voracious ring feeds",
"malum.subtitle.warping_engine_reverberates": "Warping engine reverberates",
"malum.subtitle.weight_of_worlds_slashes": "Weight of worlds slashes",
"tetra.improvement.malum.soul_strike.description": "Allows your item to shatter souls.",
"tetra.improvement.malum.soul_strike.description": "The item's material allows it to strike the soul.",
"tetra.improvement.malum.soul_strike.name": "Soul Strike",
"tetra.material.hallowed_gold": "Hallowed Gold",
"tetra.material.hallowed_gold.prefix": "Hallowed Gold",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/ring_of_manaweaving"
}
}
1 change: 1 addition & 0 deletions src/generated/resources/data/curios/tags/items/ring.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"malum:ring_of_esoteric_spoils",
"malum:ring_of_curative_talent",
"malum:ring_of_arcane_prowess",
"malum:ring_of_manaweaving",
"malum:ring_of_alchemical_mastery",
"malum:ring_of_desperate_voracity",
"malum:ring_of_the_hoarder",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"type": "malum:spirit_infusion",
"extra_items": [
{
"count": 6,
"item": "malum:soul_stained_steel_plating"
},
{
"count": 4,
"item": "malum:processed_soulstone"
}
],
"input": {
"count": 1,
"item": "malum:gilded_ring"
},
"output": {
"item": "malum:ring_of_manaweaving"
},
"spirits": [
{
"type": "arcane",
"count": 16
},
{
"type": "earthen",
"count": 16
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
.addPage(SpiritInfusionPage.fromOutput(RING_OF_CURATIVE_TALENT.get()))
.addPage(new HeadlineTextPage("reactive_trinkets.ring_of_alchemical_mastery", "reactive_trinkets.ring_of_alchemical_mastery.1"))
.addPage(SpiritInfusionPage.fromOutput(RING_OF_ALCHEMICAL_MASTERY.get()))
.addPage(new HeadlineTextPage("reactive_trinkets.ring_of_manaweaving", "reactive_trinkets.ring_of_manaweaving.1"))
.addPage(SpiritInfusionPage.fromOutput(RING_OF_MANAWEAVING.get()))
.addPage(new HeadlineTextPage("reactive_trinkets.ring_of_prowess", "reactive_trinkets.ring_of_prowess.1"))
.addPage(new TextPage("reactive_trinkets.ring_of_prowess.2"))
.addPage(SpiritInfusionPage.fromOutput(RING_OF_ARCANE_PROWESS.get()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public SilencedEffect() {
addAttributeModifier(LodestoneAttributeRegistry.MAGIC_PROFICIENCY.get(), "c7a4eea8-38ee-4b56-8623-02c9f4a8b363", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);
addAttributeModifier(LodestoneAttributeRegistry.MAGIC_RESISTANCE.get(), "90d9ba7f-4023-4b6a-88f0-d50ec5ee1040", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);

addAttributeModifier(AttributeRegistry.SOUL_WARD_STRENGTH.get(), "c804e494-0f03-49e3-b9e1-c382ddd98927", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);
addAttributeModifier(AttributeRegistry.SOUL_WARD_INTEGRITY.get(), "c804e494-0f03-49e3-b9e1-c382ddd98927", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);
addAttributeModifier(AttributeRegistry.SOUL_WARD_CAP.get(), "e0e391f4-ca5c-4237-a261-fbcb85d2a491", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);
addAttributeModifier(AttributeRegistry.SOUL_WARD_RECOVERY_RATE.get(), "c460be81-7c50-499d-b66f-ec7b78f917e4", -0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ default void pickupSpirit(LivingEntity collector, double arcaneResonance) {

}

default float overrideSoulwardDamageAbsorbPercentage(LivingHurtEvent event, LivingEntity wardedEntity, ItemStack stack, float original) {
return overrideSoulwardDamageAbsorbPercentage(wardedEntity, stack, original);
default float adjustSoulWardDamageAbsorption(LivingHurtEvent event, LivingEntity wardedEntity, ItemStack stack, float original) {
return adjustSoulWardDamageAbsorption(wardedEntity, stack, original);
}

default float overrideSoulwardDamageAbsorbPercentage(LivingEntity wardedEntity, ItemStack stack, float original) {
default float adjustSoulWardDamageAbsorption(LivingEntity wardedEntity, ItemStack stack, float original) {
return original;
}

default void onSoulwardAbsorbDamage(LivingHurtEvent event, Player wardedPlayer, ItemStack stack, float soulwardLost, float damageAbsorbed) {
default void onSoulwardAbsorbDamage(LivingHurtEvent event, Player wardedPlayer, ItemStack stack, double soulwardLost, float damageAbsorbed) {
onSoulwardAbsorbDamage(wardedPlayer, stack, soulwardLost, damageAbsorbed);
}

default void onSoulwardAbsorbDamage(Player wardedPlayer, ItemStack stack, float soulwardLost, float damageAbsorbed) {
default void onSoulwardAbsorbDamage(Player wardedPlayer, ItemStack stack, double soulwardLost, float damageAbsorbed) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public Multimap<Attribute, AttributeModifier> createExtraAttributes(Type type) {
Multimap<Attribute, AttributeModifier> attributes = ArrayListMultimap.create();
UUID uuid = ARMOR_MODIFIER_UUID_PER_TYPE.get(type);
attributes.put(AttributeRegistry.SOUL_WARD_CAP.get(), new AttributeModifier(uuid, "Soul Ward Cap", 3f, AttributeModifier.Operation.ADDITION));
attributes.put(AttributeRegistry.SOUL_WARD_RECOVERY_RATE.get(), new AttributeModifier(uuid, "Soul Ward Recovery Rate", 0.15f, AttributeModifier.Operation.MULTIPLY_BASE));
return attributes;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ public static void onPotionApplied(MobEffectEvent.Added event) {
if (event.getOldEffectInstance() == null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RUNE_OF_TWINNED_DURATION.get())) {
MobEffectInstance effect = event.getEffectInstance();
MobEffect type = effect.getEffect();
float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(type), 1f);
if (type.isBeneficial()) {
EntityHelper.extendEffect(effect, entity, (int) (effect.getDuration() * multiplier));
EntityHelper.extendEffect(effect, entity, effect.getDuration());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public static void onPotionApplied(MobEffectEvent.Added event) {
if (event.getOldEffectInstance() == null && CurioHelper.hasCurioEquipped(entity, ItemRegistry.RUNE_OF_ALIMENT_CLEANSING.get())) {
MobEffectInstance effect = event.getEffectInstance();
MobEffect type = effect.getEffect();
float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(type), 1f);
if (type.getCategory().equals(MobEffectCategory.HARMFUL)) {
EntityHelper.shortenEffect(effect, entity, (int) (effect.getDuration() * 0.33f * multiplier));
EntityHelper.shortenEffect(effect, entity, effect.getDuration() / 4);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public RuneReinforcementItem(Properties builder) {
public void addAttributeModifiers(Multimap<Attribute, AttributeModifier> map, SlotContext slotContext, ItemStack stack) {
addAttributeModifier(map, AttributeRegistry.SOUL_WARD_CAP.get(), uuid -> new AttributeModifier(uuid,
"Curio Soul Ward Capacity", 6f, AttributeModifier.Operation.ADDITION));
addAttributeModifier(map, AttributeRegistry.SOUL_WARD_STRENGTH.get(), uuid -> new AttributeModifier(uuid,
"Curio Soul Ward Strength", 1f, AttributeModifier.Operation.ADDITION));
addAttributeModifier(map, AttributeRegistry.SOUL_WARD_INTEGRITY.get(), uuid -> new AttributeModifier(uuid,
"Curio Soul Ward Strength", 0.25, AttributeModifier.Operation.MULTIPLY_BASE));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ public void addExtraTooltipLines(Consumer<Component> consumer) {

@Override
public void pickupSpirit(LivingEntity collector, double arcaneResonance) {
collector.getActiveEffectsMap().forEach((e, i) -> {
float multiplier = MobEffectRegistry.ALCHEMICAL_PROFICIENCY_MAP.getOrDefault(ForgeRegistries.MOB_EFFECTS.getKey(e), 1f);
for (MobEffectInstance instance : collector.getActiveEffectsMap().values()) {
var e = instance.getEffect();
int durationChange = (int) ((e.isBeneficial() ? 60 : 120) * arcaneResonance);
if (e.isBeneficial()) {
int base = 60 + (int) (arcaneResonance * 40);
EntityHelper.extendEffect(i, collector, (int) (base * multiplier), 1200);
} else if (e.getCategory().equals(MobEffectCategory.HARMFUL)) {
int base = 100 + (int) (arcaneResonance * 60);
EntityHelper.shortenEffect(i, collector, (int) (base * multiplier));
EntityHelper.extendEffect(instance, collector, durationChange, 1200);
continue;
}
});
if (e.getCategory().equals(MobEffectCategory.HARMFUL)) {
EntityHelper.shortenEffect(instance, collector, durationChange);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.sammy.malum.common.item.curiosities.curios.sets.alchemical;

import com.sammy.malum.common.capability.*;
import com.sammy.malum.common.item.*;
import com.sammy.malum.common.item.curiosities.curios.*;
import com.sammy.malum.core.handlers.*;
import net.minecraft.network.chat.*;
import net.minecraft.world.entity.*;
import net.minecraft.world.entity.player.*;

import java.util.function.*;

public class CurioManaweavingRing extends MalumCurioItem implements IMalumEventResponderItem {
public CurioManaweavingRing(Properties builder) {
super(builder, MalumTrinketType.ALCHEMICAL);
}

@Override
public void addExtraTooltipLines(Consumer<Component> consumer) {
consumer.accept(positiveEffect("spirits_weave_mana"));
}

@Override
public void pickupSpirit(LivingEntity collector, double arcaneResonance) {
if (collector instanceof Player player) {
var handler = MalumPlayerDataCapability.getCapability(player).soulWardHandler;
handler.soulWardProgress -= SoulWardHandler.getSoulWardCooldown(player) * arcaneResonance;
}
}
}
Loading

0 comments on commit ccd81e5

Please sign in to comment.