itemId
itemId: (Rune) -> numberThe rune's own item id: ItemID.AIRRUNE for Rune.AIR. A static, since a Rune is its name ("air"). A staff a spell needs is a SpellItem, not a rune.
rune- A
Runeconstant or a rune's name.
A type alias: another name for the type it stands for.
| Method | Returns | Description |
|---|---|---|
itemId(Rune) | number | The rune's own item id: ItemID.AIRRUNE for Rune.AIR. A static, since a Rune is its name ("air"). A staff a spell needs is a `SpellI… |
itemIds(Rune) | { number } | Every item id that pays for the rune in a spell's cost: its own item first, then each combination rune carrying it, ordered as the Rune c… |
fromItemId(number) | Rune? | The rune whose own item an item id is. A combination rune's item answers the combination rune (`Rune.fromItemId(ItemID.MISTRUNE) == Rune.MI… |
fromVarbit(number) | Rune? | The rune a rune-pouch slot's type varbit (VarbitID.RUNE_POUCH_TYPE_1 to _6) names. |
mainhandProviders() | { [Rune]: { number } } | The staves that supply each elemental rune, by rune: a table from Rune.AIR, WATER, EARTH and FIRE to the item ids of the staves tha… |
offhandProviders() | { [Rune]: { number } } | The tomes that supply each elemental rune, by rune: a table from Rune.WATER, EARTH and FIRE to the item ids of the tomes that supply… |
isSuppliedByEquipment(Rune) | boolean | Whether a worn staff or tome supplies the rune. |
| Field | Type | Description |
|---|---|---|
AIR | Rune | Air rune. |
WATER | Rune | Water rune. |
EARTH | Rune | Earth rune. |
FIRE | Rune | Fire rune. |
MIND | Rune | Mind rune. |
CHAOS | Rune | Chaos rune. |
DEATH | Rune | Death rune. |
BLOOD | Rune | Blood rune. |
COSMIC | Rune | Cosmic rune. |
NATURE | Rune | Nature rune. |
LAW | Rune | Law rune. |
SOUL | Rune | Soul rune. |
BODY | Rune | Body rune. |
ASTRAL | Rune | Astral rune. |
WRATH | Rune | Wrath rune. |
MIST | Rune | Mist rune. |
DUST | Rune | Dust rune. |
MUD | Rune | Mud rune. |
LAVA | Rune | Lava rune. |
STEAM | Rune | Steam rune. |
SMOKE | Rune | Smoke rune. |
SUNFIRE | Rune | Sunfire rune. |
AETHER | Rune | Aether rune. |
| Method | Returns | Description |
|---|---|---|
RuneClass.fromItemId | Rune? | The rune whose own item an item id is. A combination rune's item answers the combination rune (`Rune.fromItemId(ItemID.MISTRUNE) == Rune.MI… |
RuneClass.fromVarbit | Rune? | The rune a rune-pouch slot's type varbit (VarbitID.RUNE_POUCH_TYPE_1 to _6) names. |
RuneClass.mainhandProviders | { [Rune]: { number } } | The staves that supply each elemental rune, by rune: a table from Rune.AIR, WATER, EARTH and FIRE to the item ids of the staves tha… |
RuneClass.offhandProviders | { [Rune]: { number } } | The tomes that supply each elemental rune, by rune: a table from Rune.WATER, EARTH and FIRE to the item ids of the tomes that supply… |
RunePouch.contents | { { rune: Rune, quantity: number } } | What a spell can draw on from the pouch now: empty while no pouch is carried. |
RunePouch.missing | { Rune } | Which of runes the pouch does not hold enough of, read as storedContents is. |
RunePouch.storedContents | { { rune: Rune, quantity: number } } | The pouch's contents as the game's vars hold them, which stay set while the pouch is banked. To ask what a spell can use, read contents. |
itemIditemId: (Rune) -> numberThe rune's own item id: ItemID.AIRRUNE for Rune.AIR. A static, since a Rune is its name ("air"). A staff a spell needs is a SpellItem, not a rune.
runeRune constant or a rune's name.itemIdsitemIds: (Rune) -> { number }Every item id that pays for the rune in a spell's cost: its own item first, then each combination rune carrying it, ordered as the Rune constants are. It also lists sunfire runes for fire and aether runes for soul and cosmic, which the game accepts.
runeRune constant or a rune's name.fromItemIdfromItemId: (number) -> Rune?The rune whose own item an item id is. A combination rune's item answers the combination rune (Rune.fromItemId(ItemID.MISTRUNE) == Rune.MIST).
itemIdnil for an item that is no rune.fromVarbitfromVarbit: (number) -> Rune?The rune a rune-pouch slot's type varbit (VarbitID.RUNE_POUCH_TYPE_1 to _6) names.
valuenil for 0 or a value that names no rune.mainhandProvidersmainhandProviders: () -> { [Rune]: { number } }The staves that supply each elemental rune, by rune: a table from Rune.AIR, WATER, EARTH and FIRE to the item ids of the staves that supply the rune without using any. That is the plain, battle and mystic staves, each combination staff carrying it, and the ornament steam and lava staves (*_PRETTY), which the game treats as their base staff.
offhandProvidersoffhandProviders: () -> { [Rune]: { number } }The tomes that supply each elemental rune, by rune: a table from Rune.WATER, EARTH and FIRE to the item ids of the tomes that supply the rune without using any (fire has two: TOME_OF_FIRE and the untradeable BR_TOME_OF_FIRE).
isSuppliedByEquipmentisSuppliedByEquipment: (Rune) -> booleanWhether a worn staff or tome supplies the rune.
A static over the rune, since a Rune is its name ("air"), a string with no methods; a game argument after the rune is ignored. True when a worn item's name contains "staff" and one of the rune's names ("Air", "Smoke", "Mist" and "Dust" for AIR, ...), or starts with "Tome of", does not end with "(empty", and contains one. The ornament staves count, and so does an uncharged tome ("Tome of fire (empty)"); a members staff on a free world ("Members object") does not. The combination runes, SUNFIRE and AETHER are never supplied. It reads the worn items, so it raises outside a callback.
runeRune constant or a rune's name.