예제 #1
0
 void Start()
 {
     m_r       = 150;
     m_ball    = transform.Find("ball");
     m_hero    = GameObject.Find("Hero").GetComponent <CHero>();
     m_zeroPos = transform.position;
 }
예제 #2
0
        private bool IsInAbilityPhase(CHero target)
        {
            if (target.Spells.Any(x => DisableAbilities.Contains(x.Id) && x.IsInAbilityPhase))
            {
                return(true);
            }

            return(false);
        }
예제 #3
0
        protected override bool AbilityControl(CHero target, CAbility ability)
        {
            var concussiveShot = Abilities.ConcussiveShot;

            if (ability == concussiveShot && target != concussiveShot.TargetHit)
            {
                return(true);
            }

            return(false);
        }
예제 #4
0
        protected override float GetMagicalDamage(CAbility ability, CHero hero, float magicalDamageReduction, float magicalCurrentHealth, bool canHitActive)
        {
            var mysticFlare = (ability as MysticFlare);

            if (mysticFlare != null)
            {
                if (!canHitActive)
                {
                    return(DamageHelpers.GetSpellDamage(mysticFlare.GetTotalDamage(hero), magicalDamageReduction - 1));
                }

                return(0);
            }

            return(ability.GetDamage(hero, magicalDamageReduction - 1, magicalCurrentHealth));
        }
예제 #5
0
        protected override bool IsHitTime(CHero target, CAbility ability)
        {
            if (ability == Abilities.Ethereal)
            {
                return(Helpers.MultiSleeper <string> .Sleeping($"IsHitTime_{target.Name}_{ability.Name}"));
            }

            if (ability == Abilities.ConcussiveShot)
            {
                return(Helpers.MultiSleeper <string> .Sleeping($"IsHitTime_{target.Name}_{ability.Name}"));
            }

            if (ability == Abilities.ArcaneBolt)
            {
                return(Helpers.MultiSleeper <string> .Sleeping($"IsHitTime_{target.Name}_{ability.Name}"));
            }

            return(false);
        }