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..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 @@ -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() } @@ -47,7 +48,7 @@ object OpConsumeWisp : SpellAction { private data class Spell(val consumed: IMediaEntity<*>) : RenderedSpell { override fun cast(env: CastingEnvironment) { if (env is WispCastEnv) { - env.wisp.addMedia(19 * consumed.media / 20) + if (env.wisp != consumed) env.wisp.addMedia(19 * consumed.media / 20) } else { val ext = env.getExtension(ExtractMediaHook.KEY) if (ext == null) { @@ -76,4 +77,4 @@ object OpConsumeWisp : SpellAction { } } } -} \ No newline at end of file +} 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.)",