Skip to content

Conversation

@Robotgiggle
Copy link
Contributor

@Robotgiggle Robotgiggle commented Nov 21, 2025

MishapDisallowedSpell's current text (has been disallowed by the server owners) is clearly designed to be placed after the name of the pattern that caused it, as happens with most mishaps, so you'd get something like Mind's Reflection: has been disallowed by the server owners.

However, the name of the triggering pattern is obtained from the mishap context (here), and if the context doesn't have a stored name, you get nothing. MishapDisallowedSpell is thrown from CastingEnvrionment.precheckAction(), which is called in PatternIota.execute() (here) before the castedName supplier (defined 3 lines earlier) is changed to return something other than null.

The result of all this is that the mishap context doesn't get a name, and thus the chat message you get when trying to cast something containing a disallowed pattern is just has been disallowed by the server owners, with no explanation of what has been disallowed.

This PR fixes that, changing the mishap message to properly display the name of the triggering action. Note that the name of the action is not pink, as in most mishaps, to make sure that in the edge case where it somehow does get thrown with a proper context (ie an addon manually throwing it somewhere) you don't get two pink names in a row.
image

@object-Object object-Object added this pull request to the merge queue Nov 22, 2025
Merged via the queue into FallingColors:main with commit fe55e53 Nov 22, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Hex Casting Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants