public override Queue <EffectResolutionTask> GetEffectTasksWithTargets(IEffectDescription effect, Targettable[] targets, PlayerController player, Targettable source) { Queue <EffectResolutionTask> tasks = new Queue <EffectResolutionTask>(); TargetXDescription targetDescription = new TargetXDescription(targetType, GetPlayerAlignment()); targetDescription.amount = 1; targetDescription.qualifier = qualifier; TargettingQuery query = new TargettingQuery(targetDescription, player, false); GameSession gameSession = GameUtils.GetGameSession(); List <Targettable> possibleTargets = gameSession.GetPotentialTargets(); foreach (Targettable t in possibleTargets) { if (t.IsTargettable(query)) { EffectResolutionTask task = new EffectResolutionTask(); task.effect = effect; task.target = t.GetTargettableEntity(); task.player = player; task.source = source; tasks.Enqueue(task); } } return(tasks); }
public override Queue <EffectResolutionTask> GetEffectTasksWithTargets(IEffectDescription effect, Targettable[] targets, PlayerController player, Targettable source) { EffectResolutionTask task = new EffectResolutionTask(); task.effect = effect; task.target = player; task.player = player; task.source = source; return(new Queue <EffectResolutionTask>(new EffectResolutionTask[] { task })); }
public override Queue <EffectResolutionTask> GetEffectTasksWithTargets(IEffectDescription effect, Targettable[] targets, PlayerController player, Targettable source) { Queue <EffectResolutionTask> tasks = new Queue <EffectResolutionTask>(); foreach (Targettable target in targets) { EffectResolutionTask task = new EffectResolutionTask(); task.effect = effect; task.target = target.GetTargettableEntity(); task.player = player; task.source = source; tasks.Enqueue(task); } return(tasks); }
public EffectWrapper(string name, IEffectDescription effect) { Name = name; EffectDescription = effect; }
public abstract Queue <EffectResolutionTask> GetEffectTasksWithTargets(IEffectDescription effect, Targettable[] targets, PlayerController player, Targettable source);