Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom message type for bastions #5154

Open
arbron opened this issue Feb 10, 2025 · 0 comments
Open

Add custom message type for bastions #5154

arbron opened this issue Feb 10, 2025 · 0 comments
Labels
api migration The feature involves a system migration system: bastions

Comments

@arbron
Copy link
Collaborator

arbron commented Feb 10, 2025

Currently the Bastion singleton is responsible for creating the chat messages for bastions and handling events triggered from the bastion chat cards. Adding a new custom chat message type would allow for moving some of this logic out of that monolithic class.

This could either be handled by a single bastion card, or there could be two types to handle the bastion turns and the bastion attacks, since they have different data and rendering requirements.

The turn cards currently store all of their data in flags.dnd5e.bastion as an object containing orders (object with facility ID and order results), items (array of objects with item UUIDs and quantity), and gold (object with gold quantity and claimed boolean).

The attack cards store their data in the same place and include deaths (number of defenders killed) or undefended (no defenders before the attack occurred).

@arbron arbron added api migration The feature involves a system migration system: bastions labels Feb 10, 2025
@arbron arbron added this to the D&D5E 4.4.0 milestone Feb 10, 2025
@arbron arbron assigned arbron and unassigned arbron Feb 10, 2025
@arbron arbron removed this from the D&D5E 4.4.0 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api migration The feature involves a system migration system: bastions
Projects
None yet
Development

No branches or pull requests

1 participant