Skip to content

IsEnvironmentTarget and IsVillainTarget aren't correct (targetKind not fully general) #4

@jamespicone

Description

@jamespicone
public bool IsEnvironmentTarget
{
	get
	{
		if (TargetKind != DeckDefinition.DeckKind.Environment)
		{
			if (IsEnvironment)
			{
				return IsTarget;
			}
			return false;
		}
		return true;
	}
}

IsVillainTarget has the same pattern. This isn't correct; a card with kind: "Environment" and targetKind: "Villain" will return true for IsEnvironmentTarget.

In general, targetKind only works if:

  • kind is Other
  • targetKind is Environment or Villain.

Any other combination won't be treated correctly by the engine or base game cards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engine_issueThe engine does something weird internallynot_fully_generalAn engine feature that looks general will only work for specific cases

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions