@sharpee/stdlib 0.9.113 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/author/index.d.ts.map +1 -1
- package/actions/author/trace.d.ts +1 -1
- package/actions/author/trace.d.ts.map +1 -1
- package/actions/base/index.d.ts.map +1 -1
- package/actions/base/migration-shim.d.ts +1 -1
- package/actions/base/migration-shim.d.ts.map +1 -1
- package/actions/base/report-helpers.d.ts +1 -1
- package/actions/base/report-helpers.d.ts.map +1 -1
- package/actions/base/snapshot-utils.d.ts +1 -1
- package/actions/base/snapshot-utils.d.ts.map +1 -1
- package/actions/base/snapshot-utils.js +1 -1
- package/actions/capability-dispatch.d.ts.map +1 -1
- package/actions/capability-dispatch.js +1 -1
- package/actions/constants.d.ts.map +1 -1
- package/actions/context-adapter.d.ts +3 -3
- package/actions/context-adapter.d.ts.map +1 -1
- package/actions/data-builder-types.d.ts +1 -1
- package/actions/data-builder-types.d.ts.map +1 -1
- package/actions/enhanced-context.d.ts +1 -1
- package/actions/enhanced-context.d.ts.map +1 -1
- package/actions/enhanced-context.js +18 -2
- package/actions/enhanced-context.js.map +1 -1
- package/actions/enhanced-types.d.ts +37 -2
- package/actions/enhanced-types.d.ts.map +1 -1
- package/actions/enhanced-types.js.map +1 -1
- package/actions/helpers/emit-illustrations.d.ts +2 -2
- package/actions/helpers/emit-illustrations.d.ts.map +1 -1
- package/actions/index.d.ts +1 -2
- package/actions/index.d.ts.map +1 -1
- package/actions/index.js +1 -2
- package/actions/index.js.map +1 -1
- package/actions/meta-action.d.ts +1 -1
- package/actions/meta-action.d.ts.map +1 -1
- package/actions/meta-registry.d.ts.map +1 -1
- package/actions/registry.d.ts +1 -1
- package/actions/registry.d.ts.map +1 -1
- package/actions/standard/about/about-events.d.ts +2 -0
- package/actions/standard/about/about-events.d.ts.map +1 -1
- package/actions/standard/about/about.d.ts.map +1 -1
- package/actions/standard/about/about.js +5 -2
- package/actions/standard/about/about.js.map +1 -1
- package/actions/standard/about/index.d.ts.map +1 -1
- package/actions/standard/again/again-events.d.ts.map +1 -1
- package/actions/standard/again/again.d.ts.map +1 -1
- package/actions/standard/again/again.js +1 -1
- package/actions/standard/again/index.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-data.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-events.d.ts +1 -1
- package/actions/standard/attacking/attacking-events.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-types.d.ts +1 -1
- package/actions/standard/attacking/attacking-types.d.ts.map +1 -1
- package/actions/standard/attacking/attacking.d.ts.map +1 -1
- package/actions/standard/attacking/attacking.js +1 -1
- package/actions/standard/attacking/index.d.ts.map +1 -1
- package/actions/standard/climbing/climbing-events.d.ts +1 -1
- package/actions/standard/climbing/climbing-events.d.ts.map +1 -1
- package/actions/standard/climbing/climbing.d.ts.map +1 -1
- package/actions/standard/climbing/climbing.js +1 -1
- package/actions/standard/climbing/index.d.ts.map +1 -1
- package/actions/standard/closing/closing-data.d.ts.map +1 -1
- package/actions/standard/closing/closing-error-prevents-closing.d.ts.map +1 -1
- package/actions/standard/closing/closing-event-data.d.ts +1 -1
- package/actions/standard/closing/closing-event-data.d.ts.map +1 -1
- package/actions/standard/closing/closing-messages.d.ts.map +1 -1
- package/actions/standard/closing/closing.d.ts.map +1 -1
- package/actions/standard/closing/closing.js +1 -1
- package/actions/standard/closing/index.d.ts.map +1 -1
- package/actions/standard/drinking/drinking-events.d.ts +1 -1
- package/actions/standard/drinking/drinking-events.d.ts.map +1 -1
- package/actions/standard/drinking/drinking.d.ts.map +1 -1
- package/actions/standard/drinking/drinking.js +1 -1
- package/actions/standard/drinking/index.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-data.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-data.js +1 -1
- package/actions/standard/dropping/dropping-events.d.ts +1 -1
- package/actions/standard/dropping/dropping-events.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-messages.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-types.d.ts +2 -2
- package/actions/standard/dropping/dropping-types.d.ts.map +1 -1
- package/actions/standard/dropping/dropping.d.ts.map +1 -1
- package/actions/standard/dropping/dropping.js +1 -1
- package/actions/standard/dropping/index.d.ts.map +1 -1
- package/actions/standard/eating/eating-events.d.ts +1 -1
- package/actions/standard/eating/eating-events.d.ts.map +1 -1
- package/actions/standard/eating/eating.d.ts.map +1 -1
- package/actions/standard/eating/eating.js +1 -1
- package/actions/standard/eating/index.d.ts.map +1 -1
- package/actions/standard/entering/entering-events.d.ts +1 -1
- package/actions/standard/entering/entering-events.d.ts.map +1 -1
- package/actions/standard/entering/entering-messages.d.ts.map +1 -1
- package/actions/standard/entering/entering.d.ts.map +1 -1
- package/actions/standard/entering/entering.js +1 -1
- package/actions/standard/entering/index.d.ts.map +1 -1
- package/actions/standard/examining/examining-data.d.ts +1 -1
- package/actions/standard/examining/examining-data.d.ts.map +1 -1
- package/actions/standard/examining/examining-data.js +36 -2
- package/actions/standard/examining/examining-data.js.map +1 -1
- package/actions/standard/examining/examining-events.d.ts +1 -1
- package/actions/standard/examining/examining-events.d.ts.map +1 -1
- package/actions/standard/examining/examining-messages.d.ts +1 -0
- package/actions/standard/examining/examining-messages.d.ts.map +1 -1
- package/actions/standard/examining/examining-messages.js +1 -0
- package/actions/standard/examining/examining-messages.js.map +1 -1
- package/actions/standard/examining/examining.d.ts.map +1 -1
- package/actions/standard/examining/examining.js +1 -0
- package/actions/standard/examining/examining.js.map +1 -1
- package/actions/standard/examining/index.d.ts.map +1 -1
- package/actions/standard/exiting/exiting-events.d.ts +1 -1
- package/actions/standard/exiting/exiting-events.d.ts.map +1 -1
- package/actions/standard/exiting/exiting-messages.d.ts.map +1 -1
- package/actions/standard/exiting/exiting.d.ts.map +1 -1
- package/actions/standard/exiting/exiting.js +1 -1
- package/actions/standard/exiting/index.d.ts.map +1 -1
- package/actions/standard/giving/giving-events.d.ts.map +1 -1
- package/actions/standard/giving/giving.d.ts.map +1 -1
- package/actions/standard/giving/giving.js +1 -1
- package/actions/standard/giving/index.d.ts.map +1 -1
- package/actions/standard/going/going-data.d.ts.map +1 -1
- package/actions/standard/going/going-data.js +1 -1
- package/actions/standard/going/going-events.d.ts +1 -1
- package/actions/standard/going/going-events.d.ts.map +1 -1
- package/actions/standard/going/going-messages.d.ts.map +1 -1
- package/actions/standard/going/going.d.ts +1 -1
- package/actions/standard/going/going.d.ts.map +1 -1
- package/actions/standard/going/going.js +1 -1
- package/actions/standard/going/index.d.ts.map +1 -1
- package/actions/standard/help/help-events.d.ts.map +1 -1
- package/actions/standard/help/help.d.ts.map +1 -1
- package/actions/standard/help/index.d.ts.map +1 -1
- package/actions/standard/hiding/concealment-break.d.ts +1 -1
- package/actions/standard/hiding/concealment-break.d.ts.map +1 -1
- package/actions/standard/hiding/concealment-break.js +1 -1
- package/actions/standard/hiding/hiding-events.d.ts +2 -2
- package/actions/standard/hiding/hiding-events.d.ts.map +1 -1
- package/actions/standard/hiding/hiding.d.ts.map +1 -1
- package/actions/standard/hiding/hiding.js +1 -1
- package/actions/standard/hiding/index.d.ts.map +1 -1
- package/actions/standard/hiding/revealing.d.ts.map +1 -1
- package/actions/standard/hiding/revealing.js +1 -1
- package/actions/standard/index.d.ts.map +1 -1
- package/actions/standard/inserting/index.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-data.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-events.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-messages.d.ts.map +1 -1
- package/actions/standard/inserting/inserting.d.ts.map +1 -1
- package/actions/standard/inventory/index.d.ts.map +1 -1
- package/actions/standard/inventory/inventory-events.d.ts.map +1 -1
- package/actions/standard/inventory/inventory-messages.d.ts.map +1 -1
- package/actions/standard/inventory/inventory.d.ts.map +1 -1
- package/actions/standard/inventory/inventory.js +1 -1
- package/actions/standard/listening/index.d.ts.map +1 -1
- package/actions/standard/listening/listening-events.d.ts +1 -1
- package/actions/standard/listening/listening-events.d.ts.map +1 -1
- package/actions/standard/listening/listening.d.ts.map +1 -1
- package/actions/standard/listening/listening.js +1 -1
- package/actions/standard/lock-shared.d.ts +2 -2
- package/actions/standard/lock-shared.d.ts.map +1 -1
- package/actions/standard/lock-shared.js +1 -1
- package/actions/standard/locking/index.d.ts.map +1 -1
- package/actions/standard/locking/locking-events.d.ts +1 -1
- package/actions/standard/locking/locking-events.d.ts.map +1 -1
- package/actions/standard/locking/locking-messages.d.ts.map +1 -1
- package/actions/standard/locking/locking.d.ts.map +1 -1
- package/actions/standard/locking/locking.js +1 -1
- package/actions/standard/looking/index.d.ts.map +1 -1
- package/actions/standard/looking/looking-data.d.ts.map +1 -1
- package/actions/standard/looking/looking-data.js +2 -2
- package/actions/standard/looking/looking-events.d.ts.map +1 -1
- package/actions/standard/looking/looking-messages.d.ts.map +1 -1
- package/actions/standard/looking/looking.d.ts.map +1 -1
- package/actions/standard/looking/looking.js +1 -1
- package/actions/standard/lowering/index.d.ts.map +1 -1
- package/actions/standard/lowering/lowering.d.ts.map +1 -1
- package/actions/standard/opening/index.d.ts.map +1 -1
- package/actions/standard/opening/opening-data.d.ts.map +1 -1
- package/actions/standard/opening/opening-events.d.ts +1 -1
- package/actions/standard/opening/opening-events.d.ts.map +1 -1
- package/actions/standard/opening/opening-messages.d.ts.map +1 -1
- package/actions/standard/opening/opening-types.d.ts +1 -1
- package/actions/standard/opening/opening-types.d.ts.map +1 -1
- package/actions/standard/opening/opening.d.ts.map +1 -1
- package/actions/standard/opening/opening.js +1 -1
- package/actions/standard/pulling/index.d.ts.map +1 -1
- package/actions/standard/pulling/pulling-events.d.ts +1 -1
- package/actions/standard/pulling/pulling-events.d.ts.map +1 -1
- package/actions/standard/pulling/pulling.d.ts.map +1 -1
- package/actions/standard/pulling/pulling.js +1 -1
- package/actions/standard/pushing/index.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-events.d.ts +1 -1
- package/actions/standard/pushing/pushing-events.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-original.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-original.js +1 -1
- package/actions/standard/pushing/pushing-types.d.ts +1 -1
- package/actions/standard/pushing/pushing-types.d.ts.map +1 -1
- package/actions/standard/pushing/pushing.d.ts.map +1 -1
- package/actions/standard/pushing/pushing.js +1 -1
- package/actions/standard/putting/index.d.ts.map +1 -1
- package/actions/standard/putting/putting-data.d.ts.map +1 -1
- package/actions/standard/putting/putting-events.d.ts.map +1 -1
- package/actions/standard/putting/putting-messages.d.ts.map +1 -1
- package/actions/standard/putting/putting-types.d.ts +1 -1
- package/actions/standard/putting/putting-types.d.ts.map +1 -1
- package/actions/standard/putting/putting.d.ts.map +1 -1
- package/actions/standard/putting/putting.js +1 -1
- package/actions/standard/quitting/index.d.ts.map +1 -1
- package/actions/standard/quitting/quitting-events.d.ts.map +1 -1
- package/actions/standard/quitting/quitting.d.ts.map +1 -1
- package/actions/standard/quitting/quitting.js +1 -1
- package/actions/standard/raising/index.d.ts.map +1 -1
- package/actions/standard/raising/raising.d.ts.map +1 -1
- package/actions/standard/reading/index.d.ts.map +1 -1
- package/actions/standard/reading/reading-events.d.ts +1 -1
- package/actions/standard/reading/reading-events.d.ts.map +1 -1
- package/actions/standard/reading/reading.d.ts.map +1 -1
- package/actions/standard/reading/reading.js +1 -1
- package/actions/standard/removing/index.d.ts.map +1 -1
- package/actions/standard/removing/removing-data.d.ts.map +1 -1
- package/actions/standard/removing/removing-events.d.ts.map +1 -1
- package/actions/standard/removing/removing-messages.d.ts.map +1 -1
- package/actions/standard/removing/removing-types.d.ts +1 -1
- package/actions/standard/removing/removing-types.d.ts.map +1 -1
- package/actions/standard/removing/removing.d.ts.map +1 -1
- package/actions/standard/removing/removing.js +1 -1
- package/actions/standard/restarting/index.d.ts.map +1 -1
- package/actions/standard/restarting/restarting-events.d.ts.map +1 -1
- package/actions/standard/restarting/restarting.d.ts.map +1 -1
- package/actions/standard/restarting/restarting.js +1 -1
- package/actions/standard/restoring/index.d.ts.map +1 -1
- package/actions/standard/restoring/restoring-events.d.ts.map +1 -1
- package/actions/standard/restoring/restoring.d.ts.map +1 -1
- package/actions/standard/restoring/restoring.js +1 -1
- package/actions/standard/saving/index.d.ts.map +1 -1
- package/actions/standard/saving/saving-events.d.ts.map +1 -1
- package/actions/standard/saving/saving.d.ts.map +1 -1
- package/actions/standard/saving/saving.js +1 -1
- package/actions/standard/scoring/index.d.ts.map +1 -1
- package/actions/standard/scoring/scoring-events.d.ts.map +1 -1
- package/actions/standard/scoring/scoring.d.ts.map +1 -1
- package/actions/standard/scoring/scoring.js +1 -1
- package/actions/standard/searching/index.d.ts.map +1 -1
- package/actions/standard/searching/searching-events.d.ts +1 -1
- package/actions/standard/searching/searching-events.d.ts.map +1 -1
- package/actions/standard/searching/searching.d.ts.map +1 -1
- package/actions/standard/searching/searching.js +1 -1
- package/actions/standard/searching-helpers.d.ts +1 -1
- package/actions/standard/searching-helpers.d.ts.map +1 -1
- package/actions/standard/searching-helpers.js +1 -1
- package/actions/standard/showing/index.d.ts.map +1 -1
- package/actions/standard/showing/showing-events.d.ts.map +1 -1
- package/actions/standard/showing/showing.d.ts.map +1 -1
- package/actions/standard/showing/showing.js +1 -1
- package/actions/standard/sleeping/index.d.ts.map +1 -1
- package/actions/standard/sleeping/sleeping-events.d.ts +1 -1
- package/actions/standard/sleeping/sleeping-events.d.ts.map +1 -1
- package/actions/standard/sleeping/sleeping.d.ts.map +1 -1
- package/actions/standard/smelling/index.d.ts.map +1 -1
- package/actions/standard/smelling/smelling-events.d.ts +1 -1
- package/actions/standard/smelling/smelling-events.d.ts.map +1 -1
- package/actions/standard/smelling/smelling.d.ts.map +1 -1
- package/actions/standard/smelling/smelling.js +1 -1
- package/actions/standard/switching-shared.d.ts +1 -1
- package/actions/standard/switching-shared.d.ts.map +1 -1
- package/actions/standard/switching-shared.js +1 -1
- package/actions/standard/switching_off/index.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off-events.d.ts +1 -1
- package/actions/standard/switching_off/switching_off-events.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off-messages.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off.js +1 -1
- package/actions/standard/switching_on/index.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on-events.d.ts +1 -1
- package/actions/standard/switching_on/switching_on-events.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on-messages.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on.js +1 -1
- package/actions/standard/taking/index.d.ts.map +1 -1
- package/actions/standard/taking/taking-data.d.ts.map +1 -1
- package/actions/standard/taking/taking-events.d.ts +1 -1
- package/actions/standard/taking/taking-events.d.ts.map +1 -1
- package/actions/standard/taking/taking-messages.d.ts.map +1 -1
- package/actions/standard/taking/taking-types.d.ts +2 -2
- package/actions/standard/taking/taking-types.d.ts.map +1 -1
- package/actions/standard/taking/taking.d.ts.map +1 -1
- package/actions/standard/taking/taking.js +1 -1
- package/actions/standard/taking_off/index.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off-events.d.ts +1 -1
- package/actions/standard/taking_off/taking-off-events.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off.js +1 -1
- package/actions/standard/talking/index.d.ts.map +1 -1
- package/actions/standard/talking/talking-events.d.ts +1 -1
- package/actions/standard/talking/talking-events.d.ts.map +1 -1
- package/actions/standard/talking/talking.d.ts.map +1 -1
- package/actions/standard/talking/talking.js +1 -1
- package/actions/standard/throwing/index.d.ts.map +1 -1
- package/actions/standard/throwing/throwing-events.d.ts.map +1 -1
- package/actions/standard/throwing/throwing.d.ts.map +1 -1
- package/actions/standard/throwing/throwing.js +1 -1
- package/actions/standard/touching/index.d.ts.map +1 -1
- package/actions/standard/touching/touching-events.d.ts +1 -1
- package/actions/standard/touching/touching-events.d.ts.map +1 -1
- package/actions/standard/touching/touching.d.ts.map +1 -1
- package/actions/standard/touching/touching.js +1 -1
- package/actions/standard/undoing/index.d.ts.map +1 -1
- package/actions/standard/undoing/undoing-events.d.ts.map +1 -1
- package/actions/standard/undoing/undoing.d.ts.map +1 -1
- package/actions/standard/undoing/undoing.js +1 -1
- package/actions/standard/unlocking/index.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking-events.d.ts +1 -1
- package/actions/standard/unlocking/unlocking-events.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking-messages.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking.js +1 -1
- package/actions/standard/version/index.d.ts.map +1 -1
- package/actions/standard/version/version-events.d.ts.map +1 -1
- package/actions/standard/version/version.d.ts.map +1 -1
- package/actions/standard/version/version.js +1 -1
- package/actions/standard/waiting/index.d.ts.map +1 -1
- package/actions/standard/waiting/waiting-events.d.ts +1 -1
- package/actions/standard/waiting/waiting-events.d.ts.map +1 -1
- package/actions/standard/waiting/waiting.d.ts.map +1 -1
- package/actions/standard/wearable-shared.d.ts +2 -2
- package/actions/standard/wearable-shared.d.ts.map +1 -1
- package/actions/standard/wearable-shared.js +1 -1
- package/actions/standard/wearing/index.d.ts.map +1 -1
- package/actions/standard/wearing/wearing-events.d.ts +1 -1
- package/actions/standard/wearing/wearing-events.d.ts.map +1 -1
- package/actions/standard/wearing/wearing-messages.d.ts.map +1 -1
- package/actions/standard/wearing/wearing.d.ts.map +1 -1
- package/actions/standard/wearing/wearing.js +1 -1
- package/actions/types.d.ts +1 -1
- package/actions/types.d.ts.map +1 -1
- package/capabilities/command-history.d.ts +1 -1
- package/capabilities/command-history.d.ts.map +1 -1
- package/capabilities/conversation.d.ts +1 -1
- package/capabilities/conversation.d.ts.map +1 -1
- package/capabilities/debug.d.ts +1 -1
- package/capabilities/debug.d.ts.map +1 -1
- package/capabilities/game-meta.d.ts +1 -1
- package/capabilities/game-meta.d.ts.map +1 -1
- package/capabilities/index.d.ts.map +1 -1
- package/capabilities/index.js +1 -1
- package/capabilities/save-restore.d.ts +1 -1
- package/capabilities/save-restore.d.ts.map +1 -1
- package/capabilities/scoring.d.ts +1 -1
- package/capabilities/scoring.d.ts.map +1 -1
- package/chains/index.d.ts +1 -1
- package/chains/index.d.ts.map +1 -1
- package/chains/opened-revealed.d.ts +2 -2
- package/chains/opened-revealed.d.ts.map +1 -1
- package/chains/opened-revealed.js +1 -1
- package/channels/index.d.ts +40 -0
- package/channels/index.d.ts.map +1 -0
- package/channels/index.js +86 -0
- package/channels/index.js.map +1 -0
- package/channels/keys.d.ts +23 -0
- package/channels/keys.d.ts.map +1 -0
- package/channels/keys.js +36 -0
- package/channels/keys.js.map +1 -0
- package/channels/media.d.ts +135 -0
- package/channels/media.d.ts.map +1 -0
- package/channels/media.js +397 -0
- package/channels/media.js.map +1 -0
- package/channels/registry.d.ts +58 -0
- package/channels/registry.d.ts.map +1 -0
- package/channels/registry.js +84 -0
- package/channels/registry.js.map +1 -0
- package/channels/sound-events.d.ts +72 -0
- package/channels/sound-events.d.ts.map +1 -0
- package/channels/sound-events.js +88 -0
- package/channels/sound-events.js.map +1 -0
- package/channels/standard.d.ts +209 -0
- package/channels/standard.d.ts.map +1 -0
- package/channels/standard.js +403 -0
- package/channels/standard.js.map +1 -0
- package/channels/world-helpers.d.ts +43 -0
- package/channels/world-helpers.d.ts.map +1 -0
- package/channels/world-helpers.js +72 -0
- package/channels/world-helpers.js.map +1 -0
- package/combat/index.d.ts.map +1 -1
- package/combat/weapon-utils.d.ts +1 -1
- package/combat/weapon-utils.d.ts.map +1 -1
- package/combat/weapon-utils.js +1 -1
- package/events/action-events.d.ts.map +1 -1
- package/events/base-event.d.ts.map +1 -1
- package/events/common-patterns.d.ts +1 -1
- package/events/common-patterns.d.ts.map +1 -1
- package/events/event-registry.d.ts +1 -1
- package/events/event-registry.d.ts.map +1 -1
- package/events/event-utils.d.ts +2 -2
- package/events/event-utils.d.ts.map +1 -1
- package/events/index.d.ts.map +1 -1
- package/helpers/index.d.ts.map +1 -1
- package/helpers/multi-object-handler.d.ts +2 -2
- package/helpers/multi-object-handler.d.ts.map +1 -1
- package/helpers/multi-object-handler.js +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/inference/implicit-inference.d.ts +1 -1
- package/inference/implicit-inference.d.ts.map +1 -1
- package/inference/index.d.ts.map +1 -1
- package/npc/behaviors.d.ts.map +1 -1
- package/npc/behaviors.js +1 -1
- package/npc/character-messages.d.ts.map +1 -1
- package/npc/character-observer.d.ts +2 -2
- package/npc/character-observer.d.ts.map +1 -1
- package/npc/character-observer.js +1 -1
- package/npc/index.d.ts.map +1 -1
- package/npc/lucidity-decay.d.ts +2 -2
- package/npc/lucidity-decay.d.ts.map +1 -1
- package/npc/lucidity-decay.js +1 -1
- package/npc/npc-messages.d.ts.map +1 -1
- package/npc/npc-service.d.ts +2 -2
- package/npc/npc-service.d.ts.map +1 -1
- package/npc/npc-service.js +1 -1
- package/npc/types.d.ts +2 -2
- package/npc/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/parser/index.d.ts +1 -1
- package/parser/index.d.ts.map +1 -1
- package/parser/index.js +1 -1
- package/query-handlers/index.d.ts.map +1 -1
- package/query-handlers/quit-handler.d.ts +1 -1
- package/query-handlers/quit-handler.d.ts.map +1 -1
- package/query-handlers/quit-handler.js +1 -1
- package/query-handlers/restart-handler.d.ts +1 -1
- package/query-handlers/restart-handler.d.ts.map +1 -1
- package/query-handlers/restart-handler.js +1 -1
- package/scope/index.d.ts.map +1 -1
- package/scope/scope-resolver.d.ts +1 -1
- package/scope/scope-resolver.d.ts.map +1 -1
- package/scope/scope-resolver.js +1 -1
- package/scope/types.d.ts +1 -1
- package/scope/types.d.ts.map +1 -1
- package/scope/witness-system.d.ts +1 -1
- package/scope/witness-system.d.ts.map +1 -1
- package/scope/witness-system.js +2 -2
- package/services/PerceptionService.d.ts +4 -4
- package/services/PerceptionService.d.ts.map +1 -1
- package/services/PerceptionService.js +1 -1
- package/services/index.d.ts.map +1 -1
- package/utils/entity-info.d.ts +2 -2
- package/utils/entity-info.d.ts.map +1 -1
- package/utils/entity-info.js +1 -1
- package/utils/index.d.ts.map +1 -1
- package/validation/command-validator.d.ts +13 -3
- package/validation/command-validator.d.ts.map +1 -1
- package/validation/command-validator.js +32 -2
- package/validation/command-validator.js.map +1 -1
- package/validation/index.d.ts.map +1 -1
- package/validation/types.d.ts +1 -1
- package/validation/types.d.ts.map +1 -1
- package/vocabulary/index.d.ts.map +1 -1
- package/vocabulary/standard-english.d.ts.map +1 -1
- package/actions/context.d.ts +0 -95
- package/actions/context.d.ts.map +0 -1
- package/actions/context.js +0 -272
- package/actions/context.js.map +0 -1
- package/actions/standard/inserting/inserting-semantic.d.ts +0 -42
- package/actions/standard/inserting/inserting-semantic.d.ts.map +0 -1
- package/actions/standard/inserting/inserting-semantic.js +0 -219
- package/actions/standard/inserting/inserting-semantic.js.map +0 -1
- package/combat/combat-messages.d.ts +0 -52
- package/combat/combat-messages.d.ts.map +0 -1
- package/combat/combat-messages.js +0 -69
- package/combat/combat-messages.js.map +0 -1
- package/combat/combat-service.d.ts +0 -109
- package/combat/combat-service.d.ts.map +0 -1
- package/combat/combat-service.js +0 -244
- package/combat/combat-service.js.map +0 -1
- package/events/helpers.d.ts +0 -44
- package/events/helpers.d.ts.map +0 -1
- package/events/helpers.js +0 -141
- package/events/helpers.js.map +0 -1
- package/services/scoring/index.d.ts +0 -6
- package/services/scoring/index.d.ts.map +0 -1
- package/services/scoring/index.js +0 -12
- package/services/scoring/index.js.map +0 -1
- package/services/scoring/scoring-event-processor.d.ts +0 -337
- package/services/scoring/scoring-event-processor.d.ts.map +0 -1
- package/services/scoring/scoring-event-processor.js +0 -613
- package/services/scoring/scoring-event-processor.js.map +0 -1
- package/services/scoring/scoring-service.d.ts +0 -185
- package/services/scoring/scoring-service.d.ts.map +0 -1
- package/services/scoring/scoring-service.js +0 -279
- package/services/scoring/scoring-service.js.map +0 -1
- package/sharpee-stdlib-0.9.109.tgz +0 -0
- package/sharpee-stdlib-0.9.110.tgz +0 -0
package/actions/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/stdlib/src/actions/context.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,sDAA+G;AAG/G,0CAA2D;AAE3D;;;GAGG;AACH,MAAa,qBAAqB;IAMd;IACA;IACA;IACA;IARF,MAAM,CAAS;IACf,aAAa,CAAgB;IACtC,UAAU,GAAwB,EAAE,CAAC;IAE5C,YACkB,KAAiB,EACjB,MAAgB,EAChB,eAAyB,EACzB,OAA0B,EAC1C,MAAe,EACf,aAA6B;QALb,UAAK,GAAL,KAAK,CAAY;QACjB,WAAM,GAAN,MAAM,CAAU;QAChB,oBAAe,GAAf,eAAe,CAAU;QACzB,YAAO,GAAP,OAAO,CAAmB;QAI1C,yFAAyF;QACzF,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI;YACtB,EAAE,EAAE,SAAS;YACb,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YACjC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;SAClB,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,aAAa,IAAK,EAAoB,CAAC,CAAC,qCAAqC;IACpG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAgB;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEzD,iBAAiB;QACjB,IA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IACH,gBAAgB,CAAC,IAAY,EAAE,QAAoB;QACjD,MAAM,OAAO,GAAsD;YACjE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,cAAc;YACpB,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,gBAAgB;SAC5B,CAAC;QAEF,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAyC,CAAC;QAC/E,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,GAAG,EAAE,MAAM,CAAC;QAE3B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,iBAAiB;oBACxB,MAAM,EAAE,EAAE,IAAI,EAAE;iBACjB;aACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,4BAA4B,CAAC,OAAiB;QAC5C,MAAM,IAAI,KAAK,CAAC,kHAAkH,CAAC,CAAC;IACtI,CAAC;CACF;AAnSD,sDAmSC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SEMANTIC VERSION: Inserting action - insert objects specifically into containers
|
|
3
|
-
*
|
|
4
|
-
* This version demonstrates how semantic grammar eliminates the need for:
|
|
5
|
-
* - Modifying parsed commands to add implicit prepositions
|
|
6
|
-
* - Checking verb.text for variations
|
|
7
|
-
* - Tight coupling to parser internals
|
|
8
|
-
*
|
|
9
|
-
* Instead, the grammar provides semantic properties that tell us:
|
|
10
|
-
* - spatialRelation: 'in' (normalized from 'in', 'into', or implicit)
|
|
11
|
-
* - manner: how the insertion should be performed
|
|
12
|
-
* - implicitPreposition: whether the user said "insert X Y" vs "insert X into Y"
|
|
13
|
-
*/
|
|
14
|
-
import { IAction } from "../../../../if-domain/index";
|
|
15
|
-
export declare const insertingActionSemantic: IAction;
|
|
16
|
-
/**
|
|
17
|
-
* Key improvements in this semantic version:
|
|
18
|
-
*
|
|
19
|
-
* 1. NO COMMAND MODIFICATION
|
|
20
|
-
* - The old version modified context.command.parsed to add 'in' preposition
|
|
21
|
-
* - This version trusts the grammar-provided semantics.spatialRelation
|
|
22
|
-
*
|
|
23
|
-
* 2. SEMANTIC-BASED BEHAVIOR
|
|
24
|
-
* - Different messages based on manner (forceful, careful, stealthy)
|
|
25
|
-
* - Sound events based on how the action was performed
|
|
26
|
-
* - Validation considers semantics (forceful + fragile = error)
|
|
27
|
-
*
|
|
28
|
-
* 3. CLEANER ARCHITECTURE
|
|
29
|
-
* - No delegation to putting action needed
|
|
30
|
-
* - No need to create modified contexts
|
|
31
|
-
* - Action is self-contained and focused
|
|
32
|
-
*
|
|
33
|
-
* 4. IMPLICIT PREPOSITION HANDLING
|
|
34
|
-
* - Grammar tells us if user said "insert X Y" via implicitPreposition flag
|
|
35
|
-
* - We can provide clearer feedback without hacking the command
|
|
36
|
-
*
|
|
37
|
-
* 5. NO PARSER COUPLING
|
|
38
|
-
* - Never accesses context.command.parsed
|
|
39
|
-
* - Never checks verb.text
|
|
40
|
-
* - Never looks at structure.preposition.text
|
|
41
|
-
*/
|
|
42
|
-
//# sourceMappingURL=inserting-semantic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inserting-semantic.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/stdlib/src/actions/standard/inserting/inserting-semantic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAsD,MAAM,oBAAoB,CAAC;AAIjG,eAAO,MAAM,uBAAuB,EAAE,OAkMrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* SEMANTIC VERSION: Inserting action - insert objects specifically into containers
|
|
4
|
-
*
|
|
5
|
-
* This version demonstrates how semantic grammar eliminates the need for:
|
|
6
|
-
* - Modifying parsed commands to add implicit prepositions
|
|
7
|
-
* - Checking verb.text for variations
|
|
8
|
-
* - Tight coupling to parser internals
|
|
9
|
-
*
|
|
10
|
-
* Instead, the grammar provides semantic properties that tell us:
|
|
11
|
-
* - spatialRelation: 'in' (normalized from 'in', 'into', or implicit)
|
|
12
|
-
* - manner: how the insertion should be performed
|
|
13
|
-
* - implicitPreposition: whether the user said "insert X Y" vs "insert X into Y"
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.insertingActionSemantic = void 0;
|
|
17
|
-
exports.insertingActionSemantic = {
|
|
18
|
-
id: 'if.action.inserting',
|
|
19
|
-
requiredMessages: [
|
|
20
|
-
'no_target',
|
|
21
|
-
'no_destination',
|
|
22
|
-
'not_held',
|
|
23
|
-
'not_insertable',
|
|
24
|
-
'not_container',
|
|
25
|
-
'already_there',
|
|
26
|
-
'inserted',
|
|
27
|
-
'inserted_forcefully',
|
|
28
|
-
'inserted_carefully',
|
|
29
|
-
'wont_fit',
|
|
30
|
-
'container_closed'
|
|
31
|
-
],
|
|
32
|
-
validate(context) {
|
|
33
|
-
const item = context.command.directObject?.entity;
|
|
34
|
-
const container = context.command.indirectObject?.entity;
|
|
35
|
-
const semantics = context.command.semantics || {};
|
|
36
|
-
// Validate we have an item
|
|
37
|
-
if (!item) {
|
|
38
|
-
return {
|
|
39
|
-
valid: false,
|
|
40
|
-
error: 'no_target'
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// Validate we have a destination
|
|
44
|
-
if (!container) {
|
|
45
|
-
return {
|
|
46
|
-
valid: false,
|
|
47
|
-
error: 'no_destination',
|
|
48
|
-
params: { item: item.attributes.name || item.id }
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
// Check if player is holding the item
|
|
52
|
-
if (!context.canReach(item)) {
|
|
53
|
-
return {
|
|
54
|
-
valid: false,
|
|
55
|
-
error: 'not_held',
|
|
56
|
-
params: { item: item.attributes.name || item.id }
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
// Check if container is actually a container
|
|
60
|
-
// Note: IEntity doesn't have getCapability - need to check attributes
|
|
61
|
-
const capabilities = container.capabilities;
|
|
62
|
-
const containerData = (container.attributes?.['container'] || capabilities?.['container']);
|
|
63
|
-
if (!containerData) {
|
|
64
|
-
return {
|
|
65
|
-
valid: false,
|
|
66
|
-
error: 'not_container',
|
|
67
|
-
params: { container: container.attributes.name || container.id }
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
// Check if container is closed
|
|
71
|
-
if (containerData.closed) {
|
|
72
|
-
return {
|
|
73
|
-
valid: false,
|
|
74
|
-
error: 'container_closed',
|
|
75
|
-
params: { container: container.attributes.name || container.id }
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
// Check if item is already in container
|
|
79
|
-
if (context.getEntityLocation(item.id) === container.id) {
|
|
80
|
-
return {
|
|
81
|
-
valid: false,
|
|
82
|
-
error: 'already_there',
|
|
83
|
-
params: {
|
|
84
|
-
item: item.attributes.name || item.id,
|
|
85
|
-
container: container.attributes.name || container.id
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
// Check capacity if applicable
|
|
90
|
-
if (containerData.maxCapacity !== undefined) {
|
|
91
|
-
const contents = context.getEntityContents(container.id);
|
|
92
|
-
if (contents.length >= containerData.maxCapacity) {
|
|
93
|
-
return {
|
|
94
|
-
valid: false,
|
|
95
|
-
error: 'wont_fit',
|
|
96
|
-
params: {
|
|
97
|
-
item: item.attributes.name || item.id,
|
|
98
|
-
container: container.attributes.name || container.id
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Semantic validation: forceful insertion might damage fragile containers
|
|
104
|
-
if (semantics.manner === 'forceful' && container.attributes?.['fragile']) {
|
|
105
|
-
return {
|
|
106
|
-
valid: false,
|
|
107
|
-
error: 'would_damage',
|
|
108
|
-
params: {
|
|
109
|
-
item: item.attributes.name || item.id,
|
|
110
|
-
container: container.attributes.name || container.id
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return { valid: true };
|
|
115
|
-
},
|
|
116
|
-
execute(context) {
|
|
117
|
-
// Revalidate
|
|
118
|
-
const validation = this.validate(context);
|
|
119
|
-
if (!validation.valid) {
|
|
120
|
-
return [context.event('if.event.insert_blocked', {
|
|
121
|
-
messageId: `${this.id}.${validation.error}`,
|
|
122
|
-
params: validation.params || {},
|
|
123
|
-
reason: validation.error
|
|
124
|
-
})];
|
|
125
|
-
}
|
|
126
|
-
const item = context.command.directObject.entity;
|
|
127
|
-
const container = context.command.indirectObject.entity;
|
|
128
|
-
const semantics = context.command.semantics || {};
|
|
129
|
-
// Move the item into the container
|
|
130
|
-
const success = context.moveEntity(item.id, container.id);
|
|
131
|
-
if (!success) {
|
|
132
|
-
return [context.event('if.event.insert_blocked', {
|
|
133
|
-
messageId: `${this.id}.insertion_failed`,
|
|
134
|
-
params: {
|
|
135
|
-
item: item.attributes.name || item.id,
|
|
136
|
-
container: container.attributes.name || container.id
|
|
137
|
-
},
|
|
138
|
-
reason: 'insertion_failed'
|
|
139
|
-
})];
|
|
140
|
-
}
|
|
141
|
-
// Choose message based on semantic manner
|
|
142
|
-
let messageId = 'inserted';
|
|
143
|
-
if (semantics.manner === 'forceful') {
|
|
144
|
-
messageId = 'inserted_forcefully';
|
|
145
|
-
}
|
|
146
|
-
else if (semantics.manner === 'careful') {
|
|
147
|
-
messageId = 'inserted_carefully';
|
|
148
|
-
}
|
|
149
|
-
else if (semantics.manner === 'stealthy') {
|
|
150
|
-
messageId = 'inserted_stealthily';
|
|
151
|
-
}
|
|
152
|
-
// If the preposition was implicit, we might want to be more explicit in the response
|
|
153
|
-
if (semantics.implicitPreposition) {
|
|
154
|
-
// The grammar told us the user said "insert X Y" not "insert X into Y"
|
|
155
|
-
// We can provide clearer feedback
|
|
156
|
-
messageId = 'inserted_into'; // "You insert the coin into the slot."
|
|
157
|
-
}
|
|
158
|
-
const itemName = item.attributes.name || item.id;
|
|
159
|
-
const containerName = container.attributes.name || container.id;
|
|
160
|
-
return [
|
|
161
|
-
// Domain event with embedded messageId (ADR-097)
|
|
162
|
-
context.event('if.event.inserted', {
|
|
163
|
-
// Rendering data (messageId + params for text-service)
|
|
164
|
-
messageId: `${this.id}.${messageId}`,
|
|
165
|
-
params: {
|
|
166
|
-
item: itemName,
|
|
167
|
-
container: containerName,
|
|
168
|
-
manner: semantics.manner || 'normal'
|
|
169
|
-
},
|
|
170
|
-
// Domain data (for event sourcing / handlers)
|
|
171
|
-
itemId: item.id,
|
|
172
|
-
itemName: itemName,
|
|
173
|
-
containerId: container.id,
|
|
174
|
-
containerName: containerName,
|
|
175
|
-
manner: semantics.manner || 'normal'
|
|
176
|
-
}),
|
|
177
|
-
// Additional semantic events based on manner
|
|
178
|
-
...(semantics.manner === 'forceful' ? [
|
|
179
|
-
context.event('sound.loud', {
|
|
180
|
-
source: container.id,
|
|
181
|
-
description: 'clunk'
|
|
182
|
-
})
|
|
183
|
-
] : []),
|
|
184
|
-
...(semantics.manner === 'stealthy' ? [
|
|
185
|
-
context.event('sound.quiet', {
|
|
186
|
-
source: container.id,
|
|
187
|
-
description: 'soft sliding'
|
|
188
|
-
})
|
|
189
|
-
] : [])
|
|
190
|
-
];
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Key improvements in this semantic version:
|
|
195
|
-
*
|
|
196
|
-
* 1. NO COMMAND MODIFICATION
|
|
197
|
-
* - The old version modified context.command.parsed to add 'in' preposition
|
|
198
|
-
* - This version trusts the grammar-provided semantics.spatialRelation
|
|
199
|
-
*
|
|
200
|
-
* 2. SEMANTIC-BASED BEHAVIOR
|
|
201
|
-
* - Different messages based on manner (forceful, careful, stealthy)
|
|
202
|
-
* - Sound events based on how the action was performed
|
|
203
|
-
* - Validation considers semantics (forceful + fragile = error)
|
|
204
|
-
*
|
|
205
|
-
* 3. CLEANER ARCHITECTURE
|
|
206
|
-
* - No delegation to putting action needed
|
|
207
|
-
* - No need to create modified contexts
|
|
208
|
-
* - Action is self-contained and focused
|
|
209
|
-
*
|
|
210
|
-
* 4. IMPLICIT PREPOSITION HANDLING
|
|
211
|
-
* - Grammar tells us if user said "insert X Y" via implicitPreposition flag
|
|
212
|
-
* - We can provide clearer feedback without hacking the command
|
|
213
|
-
*
|
|
214
|
-
* 5. NO PARSER COUPLING
|
|
215
|
-
* - Never accesses context.command.parsed
|
|
216
|
-
* - Never checks verb.text
|
|
217
|
-
* - Never looks at structure.preposition.text
|
|
218
|
-
*/
|
|
219
|
-
//# sourceMappingURL=inserting-semantic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inserting-semantic.js","sourceRoot":"","sources":["../../../../../../../../../repos/sharpee/packages/stdlib/src/actions/standard/inserting/inserting-semantic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAMU,QAAA,uBAAuB,GAAY;IAC9C,EAAE,EAAE,qBAAqB;IAEzB,gBAAgB,EAAE;QAChB,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,gBAAgB;QAChB,eAAe;QACf,eAAe;QACf,UAAU;QACV,qBAAqB;QACrB,oBAAoB;QACpB,UAAU;QACV,kBAAkB;KACnB;IAED,QAAQ,CAAC,OAAuB;QAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QAClD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;QACzD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;QAElD,2BAA2B;QAC3B,IAAI,CAAC,IAA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YAAY,EAAE;oBAC1B,MAAM,EAAE,SAAS,CAAC,EAAE;oBACpB,WAAW,EAAE,OAAO;iBACrB,CAAC;aACH,CAAC,CAAC,CAAC,EAAE,CAAC;YAEP,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE;oBAC3B,MAAM,EAAE,SAAS,CAAC,EAAE;oBACpB,WAAW,EAAE,cAAc;iBAC5B,CAAC;aACH,CAAC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combat Message IDs (ADR-072)
|
|
3
|
-
*
|
|
4
|
-
* Semantic message IDs for combat-related events.
|
|
5
|
-
* Actual text is provided by the language layer.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Message IDs for combat events
|
|
9
|
-
*/
|
|
10
|
-
export declare const CombatMessages: {
|
|
11
|
-
readonly ATTACK_MISSED: "combat.attack.missed";
|
|
12
|
-
readonly ATTACK_HIT: "combat.attack.hit";
|
|
13
|
-
readonly ATTACK_HIT_LIGHT: "combat.attack.hit_light";
|
|
14
|
-
readonly ATTACK_HIT_HEAVY: "combat.attack.hit_heavy";
|
|
15
|
-
readonly ATTACK_KNOCKED_OUT: "combat.attack.knocked_out";
|
|
16
|
-
readonly ATTACK_KILLED: "combat.attack.killed";
|
|
17
|
-
readonly DEFEND_BLOCKED: "combat.defend.blocked";
|
|
18
|
-
readonly DEFEND_PARRIED: "combat.defend.parried";
|
|
19
|
-
readonly DEFEND_DODGED: "combat.defend.dodged";
|
|
20
|
-
readonly HEALTH_HEALTHY: "combat.health.healthy";
|
|
21
|
-
readonly HEALTH_WOUNDED: "combat.health.wounded";
|
|
22
|
-
readonly HEALTH_BADLY_WOUNDED: "combat.health.badly_wounded";
|
|
23
|
-
readonly HEALTH_NEAR_DEATH: "combat.health.near_death";
|
|
24
|
-
readonly HEALTH_UNCONSCIOUS: "combat.health.unconscious";
|
|
25
|
-
readonly HEALTH_DEAD: "combat.health.dead";
|
|
26
|
-
readonly SWORD_GLOWS: "combat.special.sword_glows";
|
|
27
|
-
readonly SWORD_STOPS_GLOWING: "combat.special.sword_stops_glowing";
|
|
28
|
-
readonly BLESSED_WEAPON_EFFECT: "combat.special.blessed_weapon";
|
|
29
|
-
readonly CANNOT_ATTACK: "combat.cannot_attack";
|
|
30
|
-
readonly ALREADY_DEAD: "combat.already_dead";
|
|
31
|
-
readonly NOT_HOSTILE: "combat.not_hostile";
|
|
32
|
-
readonly NO_TARGET: "combat.no_target";
|
|
33
|
-
readonly TARGET_UNCONSCIOUS: "combat.target_unconscious";
|
|
34
|
-
readonly NEED_WEAPON: "combat.need_weapon";
|
|
35
|
-
readonly COMBAT_STARTED: "combat.started";
|
|
36
|
-
readonly COMBAT_ENDED: "combat.ended";
|
|
37
|
-
readonly PLAYER_DIED: "combat.player_died";
|
|
38
|
-
readonly PLAYER_RESURRECTED: "combat.player_resurrected";
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Type for combat message IDs
|
|
42
|
-
*/
|
|
43
|
-
export type CombatMessageId = (typeof CombatMessages)[keyof typeof CombatMessages];
|
|
44
|
-
/**
|
|
45
|
-
* Health status levels
|
|
46
|
-
*/
|
|
47
|
-
export type HealthStatus = 'healthy' | 'wounded' | 'badly_wounded' | 'near_death' | 'unconscious' | 'dead';
|
|
48
|
-
/**
|
|
49
|
-
* Get message ID for a health status
|
|
50
|
-
*/
|
|
51
|
-
export declare function getHealthStatusMessageId(status: HealthStatus): CombatMessageId;
|
|
52
|
-
//# sourceMappingURL=combat-messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combat-messages.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/stdlib/src/combat/combat-messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCjB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,eAAe,GACf,YAAY,GACZ,aAAa,GACb,MAAM,CAAC;AAEX;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,CAe9E"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Combat Message IDs (ADR-072)
|
|
4
|
-
*
|
|
5
|
-
* Semantic message IDs for combat-related events.
|
|
6
|
-
* Actual text is provided by the language layer.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CombatMessages = void 0;
|
|
10
|
-
exports.getHealthStatusMessageId = getHealthStatusMessageId;
|
|
11
|
-
/**
|
|
12
|
-
* Message IDs for combat events
|
|
13
|
-
*/
|
|
14
|
-
exports.CombatMessages = {
|
|
15
|
-
// Attack outcomes
|
|
16
|
-
ATTACK_MISSED: 'combat.attack.missed',
|
|
17
|
-
ATTACK_HIT: 'combat.attack.hit',
|
|
18
|
-
ATTACK_HIT_LIGHT: 'combat.attack.hit_light',
|
|
19
|
-
ATTACK_HIT_HEAVY: 'combat.attack.hit_heavy',
|
|
20
|
-
ATTACK_KNOCKED_OUT: 'combat.attack.knocked_out',
|
|
21
|
-
ATTACK_KILLED: 'combat.attack.killed',
|
|
22
|
-
// Defense outcomes
|
|
23
|
-
DEFEND_BLOCKED: 'combat.defend.blocked',
|
|
24
|
-
DEFEND_PARRIED: 'combat.defend.parried',
|
|
25
|
-
DEFEND_DODGED: 'combat.defend.dodged',
|
|
26
|
-
// Health status descriptions
|
|
27
|
-
HEALTH_HEALTHY: 'combat.health.healthy',
|
|
28
|
-
HEALTH_WOUNDED: 'combat.health.wounded',
|
|
29
|
-
HEALTH_BADLY_WOUNDED: 'combat.health.badly_wounded',
|
|
30
|
-
HEALTH_NEAR_DEATH: 'combat.health.near_death',
|
|
31
|
-
HEALTH_UNCONSCIOUS: 'combat.health.unconscious',
|
|
32
|
-
HEALTH_DEAD: 'combat.health.dead',
|
|
33
|
-
// Special weapon messages
|
|
34
|
-
SWORD_GLOWS: 'combat.special.sword_glows',
|
|
35
|
-
SWORD_STOPS_GLOWING: 'combat.special.sword_stops_glowing',
|
|
36
|
-
BLESSED_WEAPON_EFFECT: 'combat.special.blessed_weapon',
|
|
37
|
-
// Error/validation messages
|
|
38
|
-
CANNOT_ATTACK: 'combat.cannot_attack',
|
|
39
|
-
ALREADY_DEAD: 'combat.already_dead',
|
|
40
|
-
NOT_HOSTILE: 'combat.not_hostile',
|
|
41
|
-
NO_TARGET: 'combat.no_target',
|
|
42
|
-
TARGET_UNCONSCIOUS: 'combat.target_unconscious',
|
|
43
|
-
NEED_WEAPON: 'combat.need_weapon',
|
|
44
|
-
// Combat state messages
|
|
45
|
-
COMBAT_STARTED: 'combat.started',
|
|
46
|
-
COMBAT_ENDED: 'combat.ended',
|
|
47
|
-
PLAYER_DIED: 'combat.player_died',
|
|
48
|
-
PLAYER_RESURRECTED: 'combat.player_resurrected',
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Get message ID for a health status
|
|
52
|
-
*/
|
|
53
|
-
function getHealthStatusMessageId(status) {
|
|
54
|
-
switch (status) {
|
|
55
|
-
case 'healthy':
|
|
56
|
-
return exports.CombatMessages.HEALTH_HEALTHY;
|
|
57
|
-
case 'wounded':
|
|
58
|
-
return exports.CombatMessages.HEALTH_WOUNDED;
|
|
59
|
-
case 'badly_wounded':
|
|
60
|
-
return exports.CombatMessages.HEALTH_BADLY_WOUNDED;
|
|
61
|
-
case 'near_death':
|
|
62
|
-
return exports.CombatMessages.HEALTH_NEAR_DEATH;
|
|
63
|
-
case 'unconscious':
|
|
64
|
-
return exports.CombatMessages.HEALTH_UNCONSCIOUS;
|
|
65
|
-
case 'dead':
|
|
66
|
-
return exports.CombatMessages.HEALTH_DEAD;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=combat-messages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combat-messages.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/stdlib/src/combat/combat-messages.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAkEH,4DAeC;AA/ED;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,kBAAkB;IAClB,aAAa,EAAE,sBAAsB;IACrC,UAAU,EAAE,mBAAmB;IAC/B,gBAAgB,EAAE,yBAAyB;IAC3C,gBAAgB,EAAE,yBAAyB;IAC3C,kBAAkB,EAAE,2BAA2B;IAC/C,aAAa,EAAE,sBAAsB;IAErC,mBAAmB;IACnB,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,uBAAuB;IACvC,aAAa,EAAE,sBAAsB;IAErC,6BAA6B;IAC7B,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,uBAAuB;IACvC,oBAAoB,EAAE,6BAA6B;IACnD,iBAAiB,EAAE,0BAA0B;IAC7C,kBAAkB,EAAE,2BAA2B;IAC/C,WAAW,EAAE,oBAAoB;IAEjC,0BAA0B;IAC1B,WAAW,EAAE,4BAA4B;IACzC,mBAAmB,EAAE,oCAAoC;IACzD,qBAAqB,EAAE,+BAA+B;IAEtD,4BAA4B;IAC5B,aAAa,EAAE,sBAAsB;IACrC,YAAY,EAAE,qBAAqB;IACnC,WAAW,EAAE,oBAAoB;IACjC,SAAS,EAAE,kBAAkB;IAC7B,kBAAkB,EAAE,2BAA2B;IAC/C,WAAW,EAAE,oBAAoB;IAEjC,wBAAwB;IACxB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,oBAAoB;IACjC,kBAAkB,EAAE,2BAA2B;CACvC,CAAC;AAkBX;;GAEG;AACH,SAAgB,wBAAwB,CAAC,MAAoB;IAC3D,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,sBAAc,CAAC,cAAc,CAAC;QACvC,KAAK,SAAS;YACZ,OAAO,sBAAc,CAAC,cAAc,CAAC;QACvC,KAAK,eAAe;YAClB,OAAO,sBAAc,CAAC,oBAAoB,CAAC;QAC7C,KAAK,YAAY;YACf,OAAO,sBAAc,CAAC,iBAAiB,CAAC;QAC1C,KAAK,aAAa;YAChB,OAAO,sBAAc,CAAC,kBAAkB,CAAC;QAC3C,KAAK,MAAM;YACT,OAAO,sBAAc,CAAC,WAAW,CAAC;IACtC,CAAC;AACH,CAAC"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combat Service (ADR-072)
|
|
3
|
-
*
|
|
4
|
-
* Handles combat resolution using a skill-based probability system.
|
|
5
|
-
*/
|
|
6
|
-
import { EntityId, SeededRandom } from "../../core/index";
|
|
7
|
-
import { IFEntity, WorldModel } from "../../world-model/index";
|
|
8
|
-
import { HealthStatus } from './combat-messages';
|
|
9
|
-
/**
|
|
10
|
-
* Context for combat resolution
|
|
11
|
-
*/
|
|
12
|
-
export interface CombatContext {
|
|
13
|
-
/** The attacker entity */
|
|
14
|
-
attacker: IFEntity;
|
|
15
|
-
/** The target entity */
|
|
16
|
-
target: IFEntity;
|
|
17
|
-
/** Weapon being used (if any) */
|
|
18
|
-
weapon?: IFEntity;
|
|
19
|
-
/** The world model */
|
|
20
|
-
world: WorldModel;
|
|
21
|
-
/** Seeded random number generator */
|
|
22
|
-
random: SeededRandom;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Result of combat resolution
|
|
26
|
-
*/
|
|
27
|
-
export interface CombatResult {
|
|
28
|
-
/** Whether the attack hit */
|
|
29
|
-
hit: boolean;
|
|
30
|
-
/** Damage dealt (0 if missed) */
|
|
31
|
-
damage: number;
|
|
32
|
-
/** Target's new health after damage */
|
|
33
|
-
targetNewHealth: number;
|
|
34
|
-
/** Whether target was knocked out (unconscious) */
|
|
35
|
-
targetKnockedOut: boolean;
|
|
36
|
-
/** Whether target was killed */
|
|
37
|
-
targetKilled: boolean;
|
|
38
|
-
/** Message ID for the result */
|
|
39
|
-
messageId: string;
|
|
40
|
-
/** Data for the message */
|
|
41
|
-
messageData: Record<string, unknown>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Validation result for combat
|
|
45
|
-
*/
|
|
46
|
-
export interface CombatValidation {
|
|
47
|
-
valid: boolean;
|
|
48
|
-
messageId?: string;
|
|
49
|
-
messageData?: Record<string, unknown>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Combat Service interface
|
|
53
|
-
*/
|
|
54
|
-
export interface ICombatService {
|
|
55
|
-
/** Resolve a single attack */
|
|
56
|
-
resolveAttack(context: CombatContext): CombatResult;
|
|
57
|
-
/** Check if attacker can attack target */
|
|
58
|
-
canAttack(attacker: IFEntity, target: IFEntity): CombatValidation;
|
|
59
|
-
/** Get descriptive health status */
|
|
60
|
-
getHealthStatus(entity: IFEntity): HealthStatus;
|
|
61
|
-
/** Calculate hit chance */
|
|
62
|
-
calculateHitChance(attackerSkill: number, defenderSkill: number, weaponBonus: number): number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Combat Service implementation
|
|
66
|
-
*/
|
|
67
|
-
export declare class CombatService implements ICombatService {
|
|
68
|
-
/**
|
|
69
|
-
* Calculate hit chance based on skills
|
|
70
|
-
*
|
|
71
|
-
* Base chance starts at 50%.
|
|
72
|
-
* Each point of skill advantage = +1%.
|
|
73
|
-
* Clamped to 10%-95% (always some chance either way).
|
|
74
|
-
*/
|
|
75
|
-
calculateHitChance(attackerSkill: number, defenderSkill: number, weaponBonus: number): number;
|
|
76
|
-
/**
|
|
77
|
-
* Resolve an attack
|
|
78
|
-
*/
|
|
79
|
-
resolveAttack(context: CombatContext): CombatResult;
|
|
80
|
-
/**
|
|
81
|
-
* Check if an entity can attack another
|
|
82
|
-
*/
|
|
83
|
-
canAttack(attacker: IFEntity, target: IFEntity): CombatValidation;
|
|
84
|
-
/**
|
|
85
|
-
* Get health status for an entity
|
|
86
|
-
*/
|
|
87
|
-
getHealthStatus(entity: IFEntity): HealthStatus;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Create a new Combat Service instance
|
|
91
|
-
*/
|
|
92
|
-
export declare function createCombatService(): ICombatService;
|
|
93
|
-
/**
|
|
94
|
-
* Result of applying combat damage
|
|
95
|
-
*/
|
|
96
|
-
export interface ApplyCombatResultInfo {
|
|
97
|
-
/** IDs of items dropped from target's inventory */
|
|
98
|
-
droppedItems: EntityId[];
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Apply combat result to the target entity
|
|
102
|
-
* Handles health updates, consciousness changes, death, and inventory dropping
|
|
103
|
-
*/
|
|
104
|
-
export declare function applyCombatResult(target: IFEntity, result: CombatResult, world: WorldModel): ApplyCombatResultInfo;
|
|
105
|
-
/**
|
|
106
|
-
* Find the wielded weapon for an entity
|
|
107
|
-
*/
|
|
108
|
-
export declare function findWieldedWeapon(entity: IFEntity, world: WorldModel): IFEntity | undefined;
|
|
109
|
-
//# sourceMappingURL=combat-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combat-service.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/stdlib/src/combat/combat-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAkB,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,QAAQ,EACR,UAAU,EAIX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,YAAY,EAAE,MAAM,mBAAmB,C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