public override void Initialize(AbilitySetupEntry setup, IPlayer user) { if (Initialized) { return; } base.Initialize(setup, user); Release = Get <Release>(); Execute = Get <Execute>(); Execute.Detain = this; Execute.HasUses = HasUses; Execute.Uses = Uses; }
// TODO: Victory condition // TODO: Avoid self confirming roles (Mayor, Marshall, Crier...) public override void Initialize(AbilitySetupEntry setup, IPlayer user) { if (Initialized) { return; } base.Initialize(setup, user); var candidates = Match.LivingPlayers.AsEnumerable(); if (Setup.TargetAlwaysTown) { candidates = candidates.OrderByDescending(candidate => candidate.Role.Team.Id == "Town"); } Target = candidates.Random(Match.Random); }