From aa961b23ff7fa2783693ff1c491f719df612b941 Mon Sep 17 00:00:00 2001 From: Robotgiggle <88736742+Robotgiggle@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:26:16 -0500 Subject: [PATCH 1/4] Don't add media if wisp consumes itself --- .../common/casting/actions/spells/great/OpConsumeWisp.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt index 26483b34..53edc37f 100644 --- a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt +++ b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt @@ -46,7 +46,7 @@ object OpConsumeWisp : SpellAction { private data class Spell(val consumed: IMediaEntity<*>) : RenderedSpell { override fun cast(env: CastingEnvironment) { - if (env is WispCastEnv) { + if (env is WispCastEnv && env.wisp != consumed) { env.wisp.addMedia(19 * consumed.media / 20) } else { val ext = env.getExtension(ExtractMediaHook.KEY) @@ -76,4 +76,4 @@ object OpConsumeWisp : SpellAction { } } } -} \ No newline at end of file +} From a619128985190bbdd9a63b13a1a67df3158818ce Mon Sep 17 00:00:00 2001 From: Robotgiggle <88736742+Robotgiggle@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:26:43 -0500 Subject: [PATCH 2/4] Remove media cost for wisp consuming itself --- .../hexal/common/casting/actions/spells/great/OpConsumeWisp.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt index 53edc37f..256356d5 100644 --- a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt +++ b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt @@ -30,8 +30,9 @@ object OpConsumeWisp : SpellAction { HexalAPI.LOGGER.debug("consumer: {}, {}", consumer, consumed.fightConsume(consumer)) + val selfConsume = consumer.map({wisp -> wisp == consumed},{false}) val cost = when (consumed.fightConsume(consumer)) { - false -> HexalConfig.server.consumeWispOwnCost + false -> if (selfConsume) 0 else HexalConfig.server.consumeWispOwnCost true -> (HexalConfig.server.consumeWispOthersCostPerMedia * consumed.media).toLong() } From b188933c394aaefa8a933edd0f7965f31067a0eb Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Thu, 8 Jan 2026 19:55:16 -0500 Subject: [PATCH 3/4] Document free self-consume --- Common/src/main/resources/assets/hexal/lang/en_us.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/main/resources/assets/hexal/lang/en_us.json b/Common/src/main/resources/assets/hexal/lang/en_us.json index 4741a9ba..535e6eed 100644 --- a/Common/src/main/resources/assets/hexal/lang/en_us.json +++ b/Common/src/main/resources/assets/hexal/lang/en_us.json @@ -298,7 +298,7 @@ "hexal.entry.great_wisps": "Great Wisp Spells", "hexal.page.great_wisps.wisp/consume.0": "Remove a wisp from the stack, and disassemble the wisp. The patterns contained are lost, but the media that it contained can be repurposed if this spell is cast by another wisp.", - "hexal.page.great_wisps.wisp/consume.1": "Costs either an $(l:items/amethyst)$(item)Amethyst Shard/$ if the wisp is owned by you or has $(l:patterns/spells/wisps#hexal:wisp/transfer/allow)$(action)allowed/$ transfer with the caster or caster's owner, or half again as much media as the consumed wisp contains if the wisp is owned by another and has now allowed it. Repurposing the media is not completely efficient, losing one twentieth of the consumed wisp's reserve in transfer.", + "hexal.page.great_wisps.wisp/consume.1": "Costs either an $(l:items/amethyst)$(item)Amethyst Shard/$ if the wisp is owned by you or has $(l:patterns/spells/wisps#hexal:wisp/transfer/allow)$(action)allowed/$ transfer with the caster or caster's owner, or half again as much media as the consumed wisp contains if the wisp is owned by another and has not allowed it. Repurposing the media is not completely efficient, losing one twentieth of the consumed wisp's reserve in transfer.$(br2)Alternatively, a wisp can consume itself to self-destruct for no media cost at all.", "hexal.page.great_wisps.wisp/seon/set": "Bind one of my wisps closer to me; I may only have one bound wisp at a time, but whichever wisp is bound costs significantly less upkeep and increased range.", "hexal.page.great_wisps.wisp/seon/get": "Returns my currently bound wisp. A new wisp can only be bound when this returns null. (This is not a great spell, I have simply placed it here for convenience.)", From ca74c689cc620d73576e90a8c968c14396897876 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Sat, 17 Jan 2026 17:48:23 -0500 Subject: [PATCH 4/4] Fix self-consume check in cast() --- .../common/casting/actions/spells/great/OpConsumeWisp.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt index 256356d5..5ae9d930 100644 --- a/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt +++ b/Common/src/main/java/ram/talia/hexal/common/casting/actions/spells/great/OpConsumeWisp.kt @@ -47,8 +47,8 @@ object OpConsumeWisp : SpellAction { private data class Spell(val consumed: IMediaEntity<*>) : RenderedSpell { override fun cast(env: CastingEnvironment) { - if (env is WispCastEnv && env.wisp != consumed) { - env.wisp.addMedia(19 * consumed.media / 20) + if (env is WispCastEnv) { + if (env.wisp != consumed) env.wisp.addMedia(19 * consumed.media / 20) } else { val ext = env.getExtension(ExtractMediaHook.KEY) if (ext == null) {