// Assets/_Project/Scripts/Gameplay/Draft/BuilderEffectDraftOption.cs using UnityEngine; using TD.Core; using TD.Gameplay.BuilderEffects; namespace TD.Gameplay.Draft { /// /// Draft choice #2 — "gain a builder effect". Grants the player a passive effect that /// applies to every tower they own, adding it to their . /// /// /// Unlike , this carries the /// directly rather than an asset reference — there's no id to resolve, the enum value is the /// stable identifier and /// already key off of. /// [CreateAssetMenu(fileName = "BuilderEffectOption", menuName = "TD/Draft/Builder Effect Option")] public class BuilderEffectDraftOption : DraftOption { [Header("Payload")] [Tooltip("The builder effect this option grants.")] public BuilderEffectKind Kind; public override bool IsValidFor(ulong clientId) { var upgrades = BuilderUpgradeManager.GetForClient(clientId); return upgrades != null && !upgrades.PlayerHasEffect(Kind); } public override bool ServerApply(ulong clientId) { var upgrades = BuilderUpgradeManager.GetForClient(clientId); return upgrades != null && upgrades.ServerGrantEffect(Kind); } } }