package com.gmail.nossr50.skills.acrobatics;

import org.bukkit.event.entity.EntityDamageEvent;

import com.gmail.nossr50.datatypes.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.utilities.SkillTools;
import com.gmail.nossr50.skills.utilities.SkillType;
import com.gmail.nossr50.util.Misc;

public class DodgeEventHandler extends AcrobaticsEventHandler {
    protected DodgeEventHandler(AcrobaticsManager manager, EntityDamageEvent event) {
        super(manager, event);

        calculateSkillModifier();
        calculateModifiedDamage();
    }

    @Override
    protected void calculateSkillModifier() {
        this.skillModifier = SkillTools.skillCheck(manager.getSkillLevel(), Acrobatics.dodgeMaxBonusLevel);
    }

    @Override
    protected void calculateModifiedDamage() {
        int modifiedDamage = damage / 2;

        if (modifiedDamage <= 0) {
            modifiedDamage = 1;
        }

        this.modifiedDamage = modifiedDamage;
    }

    @Override
    protected void modifyEventDamage() {
        event.setDamage(modifiedDamage);
    }

    @Override
    protected void sendAbilityMessage() {
        manager.getMcMMOPlayer().getPlayer().sendMessage(LocaleLoader.getString("Acrobatics.Combat.Proc"));
    }

    @Override
    protected void processXpGain(int xp) {
        McMMOPlayer mcMMOPlayer = manager.getMcMMOPlayer();

        if (System.currentTimeMillis() >= mcMMOPlayer.getProfile().getRespawnATS() + Misc.PLAYER_RESPAWN_COOLDOWN_SECONDS) {
            manager.getMcMMOPlayer().beginXpGain(SkillType.ACROBATICS, xp);
        }
    }
}

@@ -37,24 +37,121 @@
 obatics;%0D%0A%0D%0A
+import org.bukkit.Effect;%0D%0Aimport org.bukkit.block.BlockFace;%0D%0Aimport org.bukkit.entity.Player;%0D%0A
 import org.b
@@ -1304,44 +1304,308 @@
     
-manager.getMcMMOPlayer().getPlayer()
+McMMOPlayer mcMMOPlayer = manager.getMcMMOPlayer();%0D%0A        Player dodgingPlayer = mcMMOPlayer.getPlayer();%0D%0A%0D%0A        dodgingPlayer.playEffect(dodgingPlayer.getEyeLocation(), Effect.SMOKE, BlockFace.SELF);%0D%0A%0D%0A        if (mcMMOPlayer.getProfile().useChatNotifications()) %7B%0D%0A            dodgingPlayer
 .sen
@@ -1661,24 +1661,35 @@
 t.Proc%22));%0D%0A
+        %7D%0D%0A
     %7D%0D%0A%0D%0A   

Add particle effect on Dodge.