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

How do i add a unique chain effect? #91

Open
Creighcl opened this issue Aug 10, 2023 · 1 comment
Open

How do i add a unique chain effect? #91

Creighcl opened this issue Aug 10, 2023 · 1 comment

Comments

@Creighcl
Copy link
Member

by level, by class, by monster

@Creighcl
Copy link
Member Author

Creighcl commented Sep 1, 2024

create or modify a custom ChainValidator. you'll have access to the full tile list and the current selection.

override moreIsChainable- applies required ruleset, discarding on any must-fail rules. if none are found this is called. here you may inspect the last tile selected successfully, the current tile trying to chain, the whole selection, and the whole board. return true if you find reasons to allow this chaining. otherwise return false -- exit fast for true in this method

override moreIsChainFinishable - you may inspect whole board and current selection. if you find reasons to deny it, return false, otherwise return true -- exit fast for false in this method

  • the validator will let you collect this
  • now we have to decide what happens when its collected

ChainAcceptedEvent and the Collection Resolution

  • Consider where the effect should occur during resolution
  • Add check in resolution - entry point at ChainAcceptedEvent.Visit
  • You may want to fire an event, you can add that in resolution
  • You may want to fire a domain event and have a state change, you can add that in resolution
  • Consider what SurfaceEvents you want going to the UI side

ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant