示例#1
0
 private void GetHit(float damage, IDebuff appliedDebuff)
 {
     this.CurrentHP -= damage;
     if (CheckIfHasHealthBar())
     {
         HealthBar.ChangeHealthbarWidth(this.MaxHP, this.CurrentHP);
     }
 }
 private IDebuff GetDebuffObject(DebuffType type)
 {
     if (_debuffs.ContainsKey(type))
     {
         return(_debuffs[type]);
     }
     else
     {
         IDebuff debuff = SpecialStateFactory.GetDebuff(type);
         _debuffs.Add(type, debuff);
         return(debuff);
     }
 }
示例#3
0
        public void AddDebuff(IProjectile projectile)
        {
            if (projectile.AssignedDebuff == null)
            {
                return;
            }

            IDebuff debuff = projectile.AssignedDebuff;

            if (!activeDebuffs.ContainsKey(debuff.Type)) //Debuffs do not stack.
            {
                activeDebuffs.Add(debuff.Type, debuff);
            }
            else
            {
                TrySetReadyForPayload(debuff.Type);
            }
        }
示例#4
0
    private void AddDebuff(GameObject target)
    {
        IDamageable damageable = target.GetComponent <IDamageable>();

        if (damageable != null && dealer != null)
        {
            Debug.Log(damageable.Status != dealer.Status);
            Debug.Log(typeDebuff);
        }
        if (damageable != null && dealer != null && damageable.Status != dealer.Status && typeDebuff != null)
        {
            if (target.GetComponent(typeDebuff.GetClass()))
            {
                IDebuff d = (IDebuff)target.GetComponent(typeDebuff.GetClass());
                if (d != null)
                {
                    d.AddStack();
                }
                return;
            }
            target.AddComponent(typeDebuff.GetClass());
        }
    }
示例#5
0
        public SpiritSiphonSettings(Menu settings, IDebuff ability)
        {
            var menu = settings.GetOrAdd(new Menu(ability.DisplayName, ability.Name).SetTexture(ability.Name));

            this.OnSight = menu.GetOrAdd(new MenuSwitcher("Use on sight"));
            this.OnSight.SetTooltip("Use ability when target is visible");
            this.OnSight.AddTranslation(Lang.Ru, "Использовать сразу");
            this.OnSight.AddTooltipTranslation(Lang.Ru, "Использовать способность сразу, когда враг появляется в зоне видимости");
            this.OnSight.AddTranslation(Lang.Cn, "立即使用");
            this.OnSight.AddTooltipTranslation(Lang.Cn, "当目标出现在视线中时,立即使用该能力");

            this.OnAttack = menu.GetOrAdd(new MenuSwitcher("Use on attack", false));
            this.OnAttack.SetTooltip("Use ability when hero is attacking");
            this.OnAttack.AddTranslation(Lang.Ru, "Использовать при атаке");
            this.OnAttack.AddTooltipTranslation(Lang.Ru, "Использовать способность, когда герой атакует");
            this.OnAttack.AddTranslation(Lang.Cn, "在攻击时使用");
            this.OnAttack.AddTooltipTranslation(Lang.Cn, "当英雄攻击时使用能力");

            this.HpThreshold = menu.GetOrAdd(new MenuSlider("HP% threshold", 40, 1, 100));
            this.HpThreshold.SetTooltip("Use when hero hp% is lower");
            this.HpThreshold.AddTranslation(Lang.Ru, "Порог ХП%");
            this.HpThreshold.AddTooltipTranslation(Lang.Ru, "Использовать способность, когда у героя меньше здоровья%");
            this.HpThreshold.AddTranslation(Lang.Cn, "生命值%");
            this.HpThreshold.AddTooltipTranslation(Lang.Cn, "当英雄健康百分比较低时使用");

            this.MaxCastRange = menu.GetOrAdd(new MenuSlider("Max cast range", 0, 0, 3000));
            this.MaxCastRange.SetTooltip("Use only when enemy is in range");
            this.MaxCastRange.AddTranslation(Lang.Ru, "Максимальная дистанция");
            this.MaxCastRange.AddTooltipTranslation(Lang.Ru, "Максимальная дистанция использования способности");
            this.MaxCastRange.AddTranslation(Lang.Cn, "最大距离");
            this.MaxCastRange.AddTooltipTranslation(Lang.Cn, "使用能力的最大距离");

            this.heroes = menu.GetOrAdd(new MenuHeroToggler("Use on:", false, true));
            this.heroes.AddTranslation(Lang.Ru, "Использовать на:");
            this.heroes.AddTranslation(Lang.Cn, "用于:");
        }
示例#6
0
 public ShrapnelDebuff(IDebuff ability)
     : base(ability)
 {
 }
 public ShrapnelAbility(IDebuff debuff, GroupSettings settings)
     : base(debuff, settings)
 {
 }
 // Token: 0x060008E1 RID: 2273 RVA: 0x00006786 File Offset: 0x00004986
 public EtherealBladeDebuff(IDebuff ability) : base(ability)
 {
 }
示例#9
0
 public TrackAbility(IDebuff debuff, GroupSettings settings)
     : base(debuff)
 {
     this.settings = new TrackSettings(settings.Menu, debuff);
 }
示例#10
0
 public DebuffAbility(IDebuff debuff, GroupSettings settings)
     : base(debuff)
 {
     this.Debuff   = debuff;
     this.settings = new DebuffSettings(settings.Menu, debuff);
 }
示例#11
0
 public DebuffAbility(IDebuff debuff)
     : base(debuff)
 {
     this.Debuff = debuff;
 }
示例#12
0
 public SpiritSiphonAbility(IDebuff debuff, GroupSettings settings)
     : base(debuff)
 {
     this.settings     = new SpiritSiphonSettings(settings.Menu, debuff);
     this.spiritSiphon = (SpiritSiphon)debuff;
 }
示例#13
0
 public OldDebuffAbility(IDebuff ability)
     : base(ability)
 {
     this.Debuff = ability;
 }
 protected Projectile(double x, double y, int speed, IEnemy target, Brush fillType, int damage, IDebuff inflictionDebuff)
     : base(x, y, Constants.ProjectileSize, Constants.ProjectileSize, fillType)
 {
     this.CalculateRotationAngle();
     GeometryUtils.RotateModel(this.Model, this.projectileAngle);
     this.Target           = target;
     this.Speed            = speed;
     this.Damage           = damage;
     this.InflictionDebuff = inflictionDebuff;
 }