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

Interactions: revert to fixed target count? #17

Open
niello opened this issue Dec 25, 2021 · 0 comments
Open

Interactions: revert to fixed target count? #17

niello opened this issue Dec 25, 2021 · 0 comments
Labels

Comments

@niello
Copy link
Owner

niello commented Dec 25, 2021

At some point NeedMoreTargets logic was introduced to support variable number of targets based on previously chosen targets. Maybe it is an overcomplication and the same variability can be achieved with different interactions, each with its own set of targets. E.g. fire staff targeted on ground and on character may trigger different interactions, not the same one with an implicit target matching tree. Don't forget to reintroduce a concept of Mandatory/Optional target, with an ability to mix them. E.g. a Mandatory target may follow an optional one, so you can choose nothing or both of them, but not the first only.

If fixing this, IsTargetValid can be moved back to target definitions instead of a single function with logic like "if target index == 0 then we expect a character". Still targets may accept a context where previous targets can be examined, e.g. if some spell requires the first target with some critaria and the second one without it or vice versa.

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

No branches or pull requests

1 participant