From 831ad57be8ad1212a2163d691526556b3122feb0 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Sun, 6 Sep 2026 01:11:12 -0400 Subject: [PATCH 1/3] Only check for enlightenment outside parens --- .../java/at/petrak/hexcasting/api/casting/iota/PatternIota.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java index 593e46a212..fd6b7e3b4a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java @@ -111,7 +111,7 @@ public boolean executable() { castedName = () -> HexAPI.instance().getActionI18n(key, reqsEnlightenment); action = Objects.requireNonNull(IXplatAbstractions.INSTANCE.getActionRegistry().get(key)).action(); - if (reqsEnlightenment && !vm.getEnv().isEnlightened()) { + if (reqsEnlightenment && !vm.getEnv().isEnlightened() && !inParens) { // this gets caught down below throw new MishapUnenlightened(); } From 3e6115d0ae837712cbb19239bae5637847620953 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Sun, 6 Sep 2026 15:37:25 -0400 Subject: [PATCH 2/3] Use separate tag for enlightenment checking in parens --- .../at/petrak/hexcasting/api/casting/iota/PatternIota.java | 4 ++-- .../src/main/java/at/petrak/hexcasting/api/mod/HexTags.java | 5 +++++ .../tags/action/requires_enlightenment_in_parens.json | 4 ++++ .../hexcasting/action/requires_enlightenment_in_parens.json | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 Fabric/src/main/resources/data/hexcasting/tags/action/requires_enlightenment_in_parens.json create mode 100644 Forge/src/main/resources/data/hexcasting/tags/hexcasting/action/requires_enlightenment_in_parens.json diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java index fd6b7e3b4a..90bddac652 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java @@ -106,12 +106,12 @@ public boolean executable() { } var reqsEnlightenment = isOfTag(IXplatAbstractions.INSTANCE.getActionRegistry(), key, - HexTags.Actions.REQUIRES_ENLIGHTENMENT); + inParens ? HexTags.Actions.REQUIRES_ENLIGHTENMENT_IN_PARENS : HexTags.Actions.REQUIRES_ENLIGHTENMENT); castedName = () -> HexAPI.instance().getActionI18n(key, reqsEnlightenment); action = Objects.requireNonNull(IXplatAbstractions.INSTANCE.getActionRegistry().get(key)).action(); - if (reqsEnlightenment && !vm.getEnv().isEnlightened() && !inParens) { + if (reqsEnlightenment && !vm.getEnv().isEnlightened()) { // this gets caught down below throw new MishapUnenlightened(); } 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 30671bf2c1..e2e9bd073f 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 @@ -76,6 +76,11 @@ public static final class Actions { * "am I not skilled enough" message */ public static final TagKey REQUIRES_ENLIGHTENMENT = create("requires_enlightenment"); + /** + * Same as REQUIRES_ENLIGHTENMENT but applies to actions that take effect while parenthesized. + * The base mod does not have any actions meeting both criteria but future addons might. + */ + public static final TagKey REQUIRES_ENLIGHTENMENT_IN_PARENS = create("requires_enlightenment_in_parens"); /** * Actions where the pattern is calculated per-world */ diff --git a/Fabric/src/main/resources/data/hexcasting/tags/action/requires_enlightenment_in_parens.json b/Fabric/src/main/resources/data/hexcasting/tags/action/requires_enlightenment_in_parens.json new file mode 100644 index 0000000000..5e8aecc986 --- /dev/null +++ b/Fabric/src/main/resources/data/hexcasting/tags/action/requires_enlightenment_in_parens.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} \ No newline at end of file diff --git a/Forge/src/main/resources/data/hexcasting/tags/hexcasting/action/requires_enlightenment_in_parens.json b/Forge/src/main/resources/data/hexcasting/tags/hexcasting/action/requires_enlightenment_in_parens.json new file mode 100644 index 0000000000..f72d209df7 --- /dev/null +++ b/Forge/src/main/resources/data/hexcasting/tags/hexcasting/action/requires_enlightenment_in_parens.json @@ -0,0 +1,3 @@ +{ + "values": [] +} \ No newline at end of file From 4f24f342ba86bb8d322cfada0dcae8706719c7f0 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Sun, 6 Sep 2026 20:19:40 -0400 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26dfda2544..6a9235ad30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## `0.11.5` - [UNRELEASED] + +### Added + +- Added the `requires_enlightenment_in_parens` tag for patterns that should mishap without enlightenment even while parenthesized ([#1290](https://github.com/FallingColors/HexMod/pull/1290)) @Robotgiggle + +### Fixed + +- Fixed Great Spells causing a mishap when drawn without enlightenment even while parenthesized ([#1290](https://github.com/FallingColors/HexMod/pull/1290)) @Robotgiggle + ## `0.11.4` - 2026-08-26 ### Added