diff --git a/CHANGELOG.md b/CHANGELOG.md index ee53b95720..1c6847ca84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Changed - The media cost of Impulse now scales linearly rather than quadratically ([#1145](https://github.com/FallingColors/HexMod/pull/1145)) @Robotgiggle +- Erase Item is now free for most items ([#1359](https://github.com/FallingColors/HexMod/pull/1359)) @beholderface ### Fixed diff --git a/Common/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json b/Common/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json new file mode 100644 index 0000000000..b18f491a95 --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json @@ -0,0 +1,7 @@ +{ + "values": [ + "hexcasting:cypher", + "hexcasting:trinket", + "hexcasting:artifact" + ] +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/mod/HexTags.java b/Common/src/main/java/at/petrak/hexcasting/api/mod/HexTags.java index 95283e0e12..b85156a682 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/mod/HexTags.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/mod/HexTags.java @@ -20,6 +20,8 @@ public static final class Items { public static final TagKey GRANTS_ROOT_ADVANCEMENT = create("grants_root_advancement"); public static final TagKey SEAL_MATERIALS = create("seal_materials"); + public static final TagKey COSTLY_TO_ERASE = create("costly_to_erase"); + public static final TagKey IMPETI = create("impeti"); public static final TagKey DIRECTRICES = create("directrices"); public static final TagKey MINDFLAYED_CIRCLE_COMPONENTS = create("brainswept_circle_components"); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt index 938a57eab9..5aa51c5cb7 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt @@ -6,6 +6,7 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.mishaps.MishapBadOffhandItem import at.petrak.hexcasting.api.misc.MediaConstants +import at.petrak.hexcasting.api.mod.HexTags import at.petrak.hexcasting.xplat.IXplatAbstractions import net.minecraft.world.item.ItemStack @@ -35,7 +36,7 @@ object OpErase : SpellAction { return SpellAction.Result( Spell(handStack), - MediaConstants.DUST_UNIT * handStack.getCount(), + if (handStack.`is`(HexTags.Items.COSTLY_TO_ERASE)) MediaConstants.DUST_UNIT / 8 else 0, listOf(), ) } diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java index 2f97a1209e..0599d43585 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java @@ -50,6 +50,9 @@ protected void addTags(HolderLookup.Provider provider) { add(tag(HexTags.Items.SEAL_MATERIALS), Items.HONEYCOMB); + add(tag(HexTags.Items.COSTLY_TO_ERASE), + HexItems.CYPHER.get(), HexItems.TRINKET.get(), HexItems.ARTIFACT.get()); + add(tag(HexTags.Items.PANS), ResourceLocation.fromNamespaceAndPath("farmersdelight", "skillet")); diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index e08d3f80f4..b9cab3d8fd 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -2147,7 +2147,7 @@ "recharge.1": "Recharge a _media-containing item in my other hand. Costs about one $(l:items/amethyst)$(item)Amethyst Shard/$ per item.", "recharge.2": "This spell is cast in a similar method to the crafting spells; an entity representing a dropped stack of $(l:items/amethyst)$(item)Amethyst/$ is provided, and recharges the _media battery of the item in my other hand.$(br2)This spell $(italic)cannot/$ recharge the item farther than its original battery size.", - "erase.1": "Clears _Hex-containing or iota-containing items in my other hand. Costs about one $(l:items/amethyst)$(item)Amethyst Dust/$ per item.", + "erase.1": "Clears _Hex-containing or iota-containing items in my other hand. Costs about one-eighth of an $(l:items/amethyst)$(item)Amethyst Dust/$ for casting items, and is free for everything else.", "erase.2": "The spell will also void all the _media stored inside the item, releasing it back to Nature and returning the item to a perfectly clean slate. This way, I can re-use $(l:items/hexcasting)$(item)Trinkets/$ I have put an erroneous spell into, for example.$(br2)This also works to clear a $(l:items/focus)$(item)Focus/$ or $(l:items/spellbook)$(item)Spellbook/$ page, unsealing them in the process.", }, diff --git a/Fabric/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json b/Fabric/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json new file mode 100644 index 0000000000..b18f491a95 --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json @@ -0,0 +1,7 @@ +{ + "values": [ + "hexcasting:cypher", + "hexcasting:trinket", + "hexcasting:artifact" + ] +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json b/Neoforge/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json new file mode 100644 index 0000000000..b18f491a95 --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/tags/item/costly_to_erase.json @@ -0,0 +1,7 @@ +{ + "values": [ + "hexcasting:cypher", + "hexcasting:trinket", + "hexcasting:artifact" + ] +} \ No newline at end of file