Dogfooding and validation mod for LegendaryCore and Legendary gameplay systems.
Its purpose is to validate encounter lifecycle seams outside of Core before any behavior or abstraction is promoted upstream. All gameplay behavior lives here first; Core is responsible only for signaling lifecycle events.
There is no marketing intent in this repository. It exists solely to prove correctness, scope, and ownership boundaries.
LegendaryContent exists to:
- Implement content-side behavior first
- Validate lifecycle seams emitted by LegendaryCore
- Promote only proven seams into Core
- Avoid premature abstraction
This repo is where behavior is tested under real content conditions before Core APIs are expanded.
ToyLightningEncounterDefinition- Example scripts:
ToyLightningScriptToyStormScript
Each encounter owns per-instance script state, managed entirely by content.
Decorates EncounterManager to invoke script hooks on:
- Join
- Participation
This is content behavior layered on top of Core’s admission logic.
Subscribes to Core lifecycle events and forwards them to scripts:
- Encounter start
- Encounter end
No Core APIs are modified to support this.
Subscribes to EncounterCleanupEvent emitted by LegendaryCore and forwards cleanup signals to content scripts.
This enables deterministic, per-instance teardown owned by content.
-
EncounterScript
Base script contract for content behavior. -
EncounterCleanupHandler
Content-only cleanup seam.
This is not part of LegendaryCore.
Cleanup handling is intentionally implemented and validated here before any consideration of promotion.
Cleanup is content-owned.
- Emits
EncounterCleanupEvent - Guarantees the event fires exactly once per encounter instance
- Does not perform cleanup logic
- Does not define teardown semantics
- Owns per-instance cleanup semantics
- Clears script-managed state
- Defines what teardown means for content
This separation is deliberate dogfooding before any cleanup API promotion.
The test suite validates the full lifecycle:
- Encounter starts
- Script state is created
- Encounter ends
EncounterCleanupEventfires exactly once- Script per-instance state is cleared
Run:
./gradlew clean test
## License
MIT — see [LICENSE](LICENSE).