public AbilityEffect GetActiveEffect() { AbilityEffect eff = new AbilityEffect(); eff.duration = effect.duration * (1 + PerkManager.GetAbilityDuration(ID)); eff.damageMin = effect.damageMin * (1 + PerkManager.GetAbilityDamage(ID)); eff.damageMax = effect.damageMax * (1 + PerkManager.GetAbilityDamage(ID)); eff.stunChance = effect.stunChance * (1 + PerkManager.GetAbilityStunChance(ID)); eff.slow = PerkManager.ModifySlowWithPerkBonus(effect.slow, ID, 2); //pass 2 to indicate this is for ability eff.dot = PerkManager.ModifyDotWithPerkBonus(effect.dot, ID, 2); eff.damageBuff = effect.damageBuff * (1 + PerkManager.GetAbilityDamageBuff(ID)); eff.rangeBuff = effect.rangeBuff * (1 + PerkManager.GetAbilityRangeBuff(ID)); eff.cooldownBuff = effect.cooldownBuff * (1 + PerkManager.GetAbilityCooldownBuff(ID)); eff.HPGainMin = effect.HPGainMin * (1 + PerkManager.GetAbilityHPGain(ID)); eff.HPGainMax = effect.HPGainMax * (1 + PerkManager.GetAbilityHPGain(ID)); return(eff); }
public AbilityEffect GetActiveEffect() { AbilityEffect eff = new AbilityEffect(); /* * PerkAbilityModifier gModifier=PerkManager.GetGlobalAbilityModifier(); * PerkAbilityModifier modifier=PerkManager.GetAbilityModifier(ID); * * eff.duration=effect.duration * (1+gModifier.effects.duration+modifier.effects.duration); * eff.damageMin=effect.damageMin * (1+gModifier.effects.damageMin+modifier.effects.damageMin); * eff.damageMax=effect.damageMax * (1+gModifier.effects.damageMax+modifier.effects.damageMax); * eff.stunChance=effect.stunChance * (1+gModifier.effects.stunChance+modifier.effects.stunChance); * * eff.slow=effect.slow.Clone(); * eff.slow.slowMultiplier*=(1-(gModifier.effects.slow.slowMultiplier+modifier.effects.slow.slowMultiplier)); * eff.slow.duration*=(1+(gModifier.effects.slow.duration+modifier.effects.slow.duration)); * * eff.damageBuff=effect.damageBuff * (1+gModifier.effects.damageBuff+modifier.effects.damageBuff); * eff.rangeBuff=effect.rangeBuff * (1+gModifier.effects.rangeBuff+modifier.effects.rangeBuff); * eff.cooldownBuff=effect.cooldownBuff * (1+gModifier.effects.cooldownBuff+modifier.effects.cooldownBuff); * eff.HPGainMin=effect.HPGainMin * (1+gModifier.effects.HPGainMin+modifier.effects.HPGainMin); * eff.HPGainMax=effect.HPGainMax * (1+gModifier.effects.HPGainMax+modifier.effects.HPGainMax); */ eff.duration = effect.duration * (1 + PerkManager.GetAbilityDuration(ID)); eff.damageMin = effect.damageMin * (1 + PerkManager.GetAbilityDamage(ID)); eff.damageMax = effect.damageMax * (1 + PerkManager.GetAbilityDamage(ID)); eff.stunChance = effect.stunChance * (1 + PerkManager.GetAbilityStunChance(ID)); eff.slow = PerkManager.ModifySlowWithPerkBonus(effect.slow.Clone(), ID, 2); //pass 2 to indicate this is for ability eff.dot = PerkManager.ModifyDotWithPerkBonus(effect.dot.Clone(), ID, 2); eff.damageBuff = effect.damageBuff * (1 + PerkManager.GetAbilityDamageBuff(ID)); eff.rangeBuff = effect.rangeBuff * (1 + PerkManager.GetAbilityRangeBuff(ID)); eff.cooldownBuff = effect.cooldownBuff * (1 + PerkManager.GetAbilityCooldownBuff(ID)); eff.HPGainMin = effect.HPGainMin * (1 + PerkManager.GetAbilityHPGain(ID)); eff.HPGainMax = effect.HPGainMax * (1 + PerkManager.GetAbilityHPGain(ID)); return(eff); }