Пример #1
0
        public static Composite Cast(string spell, SpellManager.GetSelection <Vector2i> location, SpellManager.GetSelection <bool> reqs = null)
        {
            // Note: this is safe to do. If we pass null to the requirements check, that means we always want to fire
            // as long as CanCast is true.
            if (reqs == null)
            {
                reqs = ret => true;
            }

            return(SpellManager.CreateSpellCastComposite(spell, reqs, location));
        }
Пример #2
0
        public static Composite Cast(string spell, SpellManager.GetSelection <Vector2i> location, SpellManager.GetSelection <bool> reqs = null)
        {
            // Note: this is safe to do. If we pass null to the requirements check, that means we always want to fire
            // as long as CanCast is true.
            if (reqs == null)
            {
                reqs = ret => true;
            }

            return(new PrioritySelector(
                       new Sequence(
                           SpellManager.CreateSpellCastComposite(spell, reqs, location),
                           new Action(delegate { Allrounder.Log.DebugFormat("Allrounder(Cast): Casted {0}", spell); return RunStatus.Failure; }))));
        }
Пример #3
0
        public static Composite Cast(string spell, SpellManager.GetSelection <bool> reqs = null)
        {
            // Note: this is safe to do. If we pass null to the requirements check, that means we always want to fire
            // as long as CanCast is true.
            if (reqs == null)
            {
                reqs = ret => true;
            }

            return(new PrioritySelector(
                       new Sequence(
                           SpellManager.CreateSpellCastComposite(spell, reqs, ret => Variables.MainTarget),
                           //new WaitContinue(TimeSpan.FromMilliseconds(300), ret => false, new Action(delegate { return RunStatus.Success; })),
                           new Action(delegate { Allrounder.Log.DebugFormat("Allrounder(Cast): Casted {0}", spell); return RunStatus.Failure; }))));
        }