mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
SecondaryAbilityEvent now implements Cancellable
Fire SecondaryAbilityEvent for abilities with static chances Also cleanup some of the event handling for Armor Impact, Greater Impact and Fast Food
This commit is contained in:
@ -102,6 +102,10 @@ public class ArcheryManager extends SkillManager {
|
||||
* @param arrow The {@link Arrow} that was fired
|
||||
*/
|
||||
public double skillShot(LivingEntity target, double damage, Arrow arrow) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbility.SKILL_SHOT, getPlayer())) {
|
||||
return damage;
|
||||
}
|
||||
|
||||
double damageBonusPercent = Math.min(((getSkillLevel() / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage), Archery.skillShotMaxBonusPercentage);
|
||||
double archeryBonus = Math.min(damage * damageBonusPercent, Archery.skillShotMaxBonusDamage);
|
||||
|
||||
|
Reference in New Issue
Block a user