Closed brian-gates closed 2 years ago
Examples
/inventory will display a "Use" button if usable items are present.
/inventory
const isUsable = (item: Item) => item.usable && item.useCharges === false || item.useCharges > 0
Clicking the "Use" button will prompt to select which item to use.
The list will show each item's name, a description of its effect, and number of remaining charges, if applicable.
Selecting an item will invoke it's effect.
Items with the consumeOnUse flag will be destroyed after use.
consumeOnUse
type Usable = Item & { usable: true; useCharges: false | number; consumeOnUse: boolean; }
Targeting. Self targeting will be assumed, initially. Later, the ability to choose a target will be added.
Examples
/inventory
will display a "Use" button if usable items are present.Clicking the "Use" button will prompt to select which item to use.
The list will show each item's name, a description of its effect, and number of remaining charges, if applicable.
Selecting an item will invoke it's effect.
Items with the
consumeOnUse
flag will be destroyed after use.Future Scope
Targeting. Self targeting will be assumed, initially. Later, the ability to choose a target will be added.