Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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 }));
    }
Esempio n. 3
0
    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);
    }
Esempio n. 4
0
 public EffectWrapper(string name, IEffectDescription effect)
 {
     Name = name;
     EffectDescription = effect;
 }
Esempio n. 5
0
 public abstract Queue <EffectResolutionTask> GetEffectTasksWithTargets(IEffectDescription effect, Targettable[] targets, PlayerController player, Targettable source);