/// <summary> /// Applies the given debuff. If the debuff is already on the Player, and the debuff is allowed to be refreshed, its /// duration is reset. /// </summary> /// <param name='debuff'> /// The debuff to apply. /// </param> public void applyDebuff(Debuff debuff) { if(debuffs.ContainsKey(debuff.name()) && debuff.prolongable()){ Debuff currentDebuff = (Debuff) debuffs[debuff.name()]; currentDebuff.refresh(); } else { debuff.apply(this); debuffs.Add(debuff.name(), debuff); } }
/// <summary> /// Applies a specified Debuff to the minion. /// </summary> /// <param name='debuff'> /// The Debuff to be applied. /// </param> /// <param name='stacking'> /// If the Debuff is stackable. /// NOTE: This is no longer neccessary, as the Debuff tracks if it is stackable. /// </param> public void applyDebuff(Debuff debuff, bool stacking) { if(debuffs.ContainsKey(debuff.name())) { Debuff currentDebuff = (Debuff) debuffs[debuff.name()]; if(debuff.prolongable()){ currentDebuff.refresh(); } else if(debuff.stackable()) currentDebuff.applyStack(1); } else debuffs.Add(debuff.name(), debuff); }