Class UpgradeTargetData
- Namespace
- TDMaker.Unity.Campaign
- Assembly
- TDMaker.Unity.dll
Which templates or spells an effect changes. Filters combine with AND; inside the asset list and inside the kind mask they are alternatives. Empty filters do not restrict (an effect with no filter at all changes everything of the field's kind).
public sealed class UpgradeTargetData
- Inheritance
-
UpgradeTargetData
- Inherited Members
Constructors
UpgradeTargetData()
public UpgradeTargetData()
Fields
assets
Towers, soldiers, heroes or enemies whose template ids are selected.
[Tooltip("Towers, soldiers, heroes or enemies to change (their template ids). Leave empty to select by tags or kind only.")]
public List<EntityAssetBase> assets
Field Value
kinds
Optional role filter (towers, soldiers, heroes, spells, projectiles, enemies).
[Tooltip("Optional role filter. Nothing selected: any role.")]
public UpgradeTargetKind kinds
Field Value
requiredTags
Tag bits every selected template must have (the Tags field of units). Spells have no tags.
[Tooltip("Tag bits every selected template must carry (the Tags field of units). Spells have no tags.")]
public int requiredTags
Field Value
spells
Player spells selected by spell id.
[Tooltip("Player spells to change (their spell ids).")]
public List<SpellAsset> spells
Field Value
templateIds
Further template or spell ids (for templates registered by code, for example projectile templates).
[Tooltip("Further template or spell ids, for templates registered by code.")]
public List<string> templateIds
Field Value
Properties
IsUnfiltered
Whether no filter is set (the effect would change every template that has the field).
public bool IsUnfiltered { get; }
Property Value
Methods
Ids()
Template and spell ids of the asset lists and the id list, without blanks and duplicates.
public string[] Ids()
Returns
- string[]
Matches(UpgradeTargetDef, EntityTemplate)
Whether the selector picks template (the same rule the core applies when the battle starts).
public static bool Matches(UpgradeTargetDef target, EntityTemplate template)
Parameters
targetUpgradeTargetDeftemplateEntityTemplate
Returns
MatchesSpell(UpgradeTargetDef, string)
Whether the selector picks the spell spellId.
public static bool MatchesSpell(UpgradeTargetDef target, string spellId)
Parameters
targetUpgradeTargetDefspellIdstring
Returns
ToDef()
Bakes the core selector.
public UpgradeTargetDef ToDef()