void Start() { m_r = 150; m_ball = transform.Find("ball"); m_hero = GameObject.Find("Hero").GetComponent <CHero>(); m_zeroPos = transform.position; }
private bool IsInAbilityPhase(CHero target) { if (target.Spells.Any(x => DisableAbilities.Contains(x.Id) && x.IsInAbilityPhase)) { return(true); } return(false); }
protected override bool AbilityControl(CHero target, CAbility ability) { var concussiveShot = Abilities.ConcussiveShot; if (ability == concussiveShot && target != concussiveShot.TargetHit) { return(true); } return(false); }
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)); }
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); }