Skip to content

State each closed set in one place: healing services and the morale exempt code #108

Description

@mmacy

Two places where a closed set is stated twice or a code carries two meanings, both found by reviewers during the docstring pass.

  1. PurchaseHealing.service is a Literal in crawl/commands.py and HEALING_SERVICES in crawl/exploration.py is a dict with the same keys and the prices. Adding a service to one does nothing without the other, and the docstring on HEALING_SERVICES had to warn about it (Docstrings: crawl exploration #87). Derive one from the other, or make the service table the single source and validate the command against it.

  2. MoraleCheckedEvent emits one code, combat.morale.exempt, for two opposite outcomes: a score of 2 or less never holds and a score of 12 or more always holds. The score field is the only discriminator, so a consumer cannot render the outcome from the code alone, which every other event in the catalog lets it do (Docstrings: core effects and events #95). Two codes, or an outcome field the code already carries elsewhere.

Both are additive within the schema version: a new code and a derived table change no existing field. Update the generated message-code and rejection-code pages in the same change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions