Esempio n. 1
0
 public override void Initialize(Actor data)
 {
     base.Initialize(data);
     _channelTimer = new DurationTimer(_channelTime);
     Modules.Abilitiable.TryGetAbility(out _overheatAbility);
     CheckBuilder = new AbilityPredicateBuilder(data)
     {
         Teamable  = TeamableChecker.NonAllyOnly(Modules.Teamable),
         MagicCost = new MagicCost(Modules.Magicable, _manaCost),
         Cooldown  = new Cooldown(_cooldown),
         AllowSelf = false,
     };
     View = new SimpleAbilityView()
     {
         Icon       = _icon,
         Cooldown   = CheckBuilder.Cooldown,
         StatCost   = CheckBuilder.MagicCost,
         Toggleable = new ToggleableAbilityView()
         {
             ShowActive = true
         }
     };
     CheckBuilder.RebuildChecks();
     Register(data);
 }
Esempio n. 2
0
 public override void Initialize(Actor data)
 {
     base.Initialize(data);
     Modules.Abilitiable.TryGetAbility(out _blackRose);
     _cooldown      = new DualCooldown(_rrCooldown, _brCooldown);
     _rrTeamChecker = TeamableChecker.AllyOnly(Modules.Teamable);
     _brTeamChecker = TeamableChecker.NonAllyOnly(Modules.Teamable);
     CheckBuilder   = new AbilityPredicateBuilder(data)
     {
         Cooldown  = _cooldown,
         MagicCost = new MagicCost(Modules.Magicable, _rrManaCost),
         CastRange = new CastRange(data.transform)
         {
             MaxDistance = _rrRange
         },
         AllowSelf = false
     };
     View = new SimpleAbilityView()
     {
         Icon     = _rrIcon,
         Cooldown = CheckBuilder.Cooldown,
         StatCost = CheckBuilder.MagicCost,
     };
     CheckBuilder.RebuildChecks();
     Register(data);
 }
Esempio n. 3
0
        public override void Initialize(Actor data)
        {
            base.Initialize(data);
            Modules.Abilitiable.TryGetAbility(out _blackRose);

            _nurtureAura = TriggerUtility.GetOrCreateTrigger <SphereCollider>(data, "Nurture Aura");
            _nurtureAura.Collider.radius = _nurtureRange;
            _nurtureAura.Trigger.Enter  += Nurture_Enter;
            _nurtureAura.Trigger.Exit   += Nurture_Exit;

            _neglectAura = TriggerUtility.GetOrCreateTrigger <SphereCollider>(data, "Neglect Aura");
            _neglectAura.Collider.radius = _neglectRange;
            _neglectAura.Trigger.Enter  += Neglect_Enter;
            _neglectAura.Trigger.Exit   += Neglect_Exit;

            _neglectAura.Collider.enabled = false;
            _nurtureAura.Collider.enabled = true;

            _nurtureTargets = new List <IHealable>();
            _neglectTargets = new List <IHealable>();

            _rrTeamChecker = TeamableChecker.AllyOnly(Modules.Teamable);
            _brTeamChecker = TeamableChecker.NonAllyOnly(Modules.Teamable);
            CheckBuilder   = new AbilityPredicateBuilder(data)
            {
                AllowSelf = false
            };
            View = new SimpleAbilityView()
            {
                Icon     = _rrIcon,
                Cooldown = CheckBuilder.Cooldown,
                StatCost = CheckBuilder.MagicCost,
            };
            CheckBuilder.RebuildChecks();
        }
Esempio n. 4
0
        public override void Initialize(Actor data)
        {
            base.Initialize(data);
            Modules.Abilitiable.TryGetAbility(out _overheatAbility);

            CheckBuilder = new AbilityPredicateBuilder(data)
            {
                AllowSelf = false,
                Teamable  = TeamableChecker.NonAllyOnly(Modules.Teamable),
                Cooldown  = new Cooldown(_cooldown),
                MagicCost = new MagicCost(Modules.Magicable, _manaCost),
            };
            View = new SimpleAbilityView
            {
                Cooldown = CheckBuilder.Cooldown,
                StatCost = CheckBuilder.MagicCost,
                Icon     = _icon,
            };
            CastRange = new CastRange(data.transform)
            {
                MaxDistance = _castRange
            };
            CheckBuilder.RebuildChecks();
            Register(data);
            _ticks = new List <TickAction>();
        }
Esempio n. 5
0
 public override void Initialize(Actor data)
 {
     base.Initialize(data);
     View = new SimpleAbilityView()
     {
         Icon = _icon
     };
 }
Esempio n. 6
0
 public override void Initialize(Actor data)
 {
     base.Initialize(data);
     _sphereCollider = TriggerUtility.CreateTrigger <SphereCollider>(Self, "MagicalBacklash Trigger");
     _sphereCollider.Trigger.Enter += OnActorEnter;
     _sphereCollider.Trigger.Exit  += OnActorExit;
     _targetBuffer = new List <IAbilitiable>();
     Checker       = new AbilityPredicateBuilder(data)
     {
         AllowSelf = false,
         Teamable  = TeamableChecker.NonAllyOnly(Modules.Teamable)
     };
     View = new SimpleAbilityView()
     {
         Icon = _icon
     };
     Register(data);
     if (data.TryGetModule <IKillable>(out var killable))
     {
         killable.Died += SelfDied;
     }
 }
Esempio n. 7
0
#pragma warning restore 0649

        public override void Initialize(Actor data)
        {
            base.Initialize(data);
            Checker = new AbilityPredicateBuilder(data)
            {
                Cooldown  = new Cooldown(_cooldown),
                MagicCost = new MagicCost(Modules.Magicable, _manaCost),
                Teamable  = TeamableChecker.NonAllyOnly(Modules.Teamable)
            };
            View = new SimpleAbilityView()
            {
                Cooldown = Checker.Cooldown,
                StatCost = Checker.MagicCost,
                Icon     = _icon,
            };
            CastRange = new CastRange(data.transform)
            {
                MaxDistance = _castRange
            };
            Checker.RebuildChecks();
            Register(data);
        }
Esempio n. 8
0
#pragma warning restore 0649

        public override void Initialize(Actor data)
        {
            base.Initialize(data);
            _activeTimer = new DurationTimer(_duration);
            _armorable   = Self.GetModule <IArmorable>();
            Checker      = new AbilityPredicateBuilder(data)
            {
                Cooldown  = new Cooldown(_cooldown),
                MagicCost = new MagicCost(Modules.Magicable, _manaCost)
            };
            View = new SimpleAbilityView()
            {
                Icon       = _icon,
                Cooldown   = Checker.Cooldown,
                StatCost   = Checker.MagicCost,
                Toggleable = new ToggleableAbilityView()
                {
                    ShowActive = true
                }
            };

            Register(data);
        }
Esempio n. 9
0
 public override void Initialize(Actor data)
 {
     base.Initialize(data);
     CheckBuilder = new AbilityPredicateBuilder(data)
     {
         Cooldown  = new Cooldown(_cooldown),
         MagicCost = new MagicCost(Modules.Magicable, _manaCost),
     };
     View = new SimpleAbilityView()
     {
         Icon       = _rrIcon,
         Cooldown   = CheckBuilder.Cooldown,
         StatCost   = CheckBuilder.MagicCost,
         Toggleable = new ToggleableAbilityView()
         {
             Active     = false,
             ShowActive = false
         }
     };
     CheckBuilder.RebuildChecks();
     View.Toggleable.Toggled += ToggleableOnToggled;
     Register(data);
 }