Ejemplo n.º 1
0
        public bool TryInvoke(BaseAspect aspect)
        {
            if (CanInvoke(aspect))
            {
                return(VitaNexCore.TryCatchGet(
                           () =>
                {
                    SetLock(aspect, true);

                    OnInvoke(aspect);

                    aspect.OnAbility(this);

                    var locked = Lockdown.TotalSeconds;

                    if (locked > 0)
                    {
                        locked -= aspect.Scale(locked * 0.10);
                    }

                    locked = Math.Max(0, locked);

                    Timer.DelayCall(TimeSpan.FromSeconds(locked), a => SetLock(a, false), aspect);

                    return true;
                },
                           x => x.ToConsole(true)));
            }

            return(false);
        }
Ejemplo n.º 2
0
            public MechanicSpawner(BaseAspect aspect)
                : base(0x2ADD, 0x32F4)
            {
                Aspect = aspect;

                Hits = HitsMax = Aspect.Scale(1000);

                Register(this);
            }
Ejemplo n.º 3
0
            public TinkerSpawner(BaseAspect aspect)
                : base(0x2ADD, 0x32F4)
            {
                Aspect = aspect;

                Hue = 1150;

                Hits = HitsMax = Aspect.Scale(1000);

                Register(this);
            }
Ejemplo n.º 4
0
        public AspectSpawn(BaseAspect aspect, AIType ai, FightMode mode, double dActiveSpeed, double dPassiveSpeed)
            : base(ai, mode, aspect.RangePerception, aspect.RangeFight, dActiveSpeed, dPassiveSpeed)
        {
            Aspect = aspect;

            Name = "Aspect Spawn";
            Body = 129;

            Hue  = Aspect.Hue;
            Team = Aspect.Team;

            Resistances.SetAll(i => Aspect.Resistances[i]);

            SetDamageType(ResistanceType.Physical, Aspect.PhysicalDamage);
            SetDamageType(ResistanceType.Fire, Aspect.FireDamage);
            SetDamageType(ResistanceType.Cold, Aspect.ColdDamage);
            SetDamageType(ResistanceType.Poison, Aspect.PoisonDamage);
            SetDamageType(ResistanceType.Energy, Aspect.EnergyDamage);

            Aspect.Scale(this);

            SpawnAspectAbility.Register(this);
        }