Class Spellbook
isOpen() means the current frame proves a coherent, cast-ready
spell panel; it does not remember a prior open request. open() uses
the existing revision-pinned Magic tab path, while cast(String)
resolves a fresh visible spell and invokes only its exact Cast
operation through Widgets.interact(WidgetSnapshot, String).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe only generic spell-selection operation this facade authorizes. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns whether one uniquely named visible spell currently publishes an exactCastoperation.static booleancanCastOnNpc(String spellName) Returns whether one current named spell can enter the NPC-target path.static booleanRequests selection of one visible spell whose current operation is exactlyCast.static booleanAtomically selects one current named targeted spell and applies it to one current NPC.static Optional<WidgetSnapshot> Finds one uniquely visible spell by its display name.static Optional<WidgetSnapshot> findTargeted(String spellName) Finds one current targeted-spell component in the same proven spell panel as at least two self-containedCastcontrols.static booleanReturns whether this revision supports the separately reviewed, identity-bound spell-on-NPC transaction.static booleanisOpen()Returns whether a coherent cast-ready spell panel is currently visible.static booleanReturns whether the active adapter supports safe spellbook selection.static booleanopen()Opens the Magic tab when it is not currently proven cast-ready.static List<WidgetSnapshot> Returns visible, current spell widgets that are ready to accept the exactCastoperation from the one confirmed spell panel.
-
Field Details
-
CAST_ACTION
The only generic spell-selection operation this facade authorizes.- See Also:
-
-
Method Details
-
isSupported
public static boolean isSupported()Returns whether the active adapter supports safe spellbook selection. Scripts still needgame:interact-widgetin their manifest. -
isNpcTargetingSupported
public static boolean isNpcTargetingSupported()Returns whether this revision supports the separately reviewed, identity-bound spell-on-NPC transaction. Scripts additionally need bothgame:interact-widgetandgame:interact-npcpermissions. -
isOpen
public static boolean isOpen()Returns whether a coherent cast-ready spell panel is currently visible. A lone matching widget or multiple plausible groups returns false. -
open
public static boolean open()Opens the Magic tab when it is not currently proven cast-ready.- Returns:
- true when the panel is already open or the tab request was accepted
-
visibleSpells
Returns visible, current spell widgets that are ready to accept the exactCastoperation from the one confirmed spell panel. The returned snapshots are observations, so re-query after a wait rather than retaining one for a later action. -
find
Finds one uniquely visible spell by its display name. -
canCast
Returns whether one uniquely named visible spell currently publishes an exactCastoperation. -
findTargeted
Finds one current targeted-spell component in the same proven spell panel as at least two self-containedCastcontrols.The returned component publishes no ordinary action because the client models a target spell as a separate select-then-target operation. Its sprite is corroborating metadata only; the native call rechecks the complete live panel and never lets a sprite alone authorize a cast.
-
canCastOnNpc
Returns whether one current named spell can enter the NPC-target path. -
cast
Requests selection of one visible spell whose current operation is exactlyCast.Acceptance means the native queue accepted the request, not that a spell has completed. Use
castOn(String, Npc)for the separately reviewed NPC-target operation. -
castOn
Atomically selects one current named targeted spell and applies it to one current NPC.The runtime re-resolves the spell's mounted/visible widget identity, text, renderer-backed bounds, no-ordinary-action state, and coherent spell panel. It also re-resolves the NPC by index, definition ID, and exact tile immediately before the measured client action pair. A
trueresult means queue acceptance only; it is not hit, damage, pathing, or requirement confirmation.
-