Skip to content

Interactions: revert to fixed target count? #17

Description

@niello

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions