From 1bcf43db6392a7c1ee76eb36acc667afd215297c Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 20 Feb 2013 08:49:21 -0500 Subject: [PATCH] Better way to handle daze effect. --- .../gmail/nossr50/skills/archery/DazeEventHandler.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/archery/DazeEventHandler.java b/src/main/java/com/gmail/nossr50/skills/archery/DazeEventHandler.java index 43b04a1d7..6d12652ab 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/DazeEventHandler.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/DazeEventHandler.java @@ -18,8 +18,6 @@ public class DazeEventHandler { private EntityDamageEvent event; private Player defender; - private final static int DAZE_CHANCE = 50; - protected int skillModifier; protected DazeEventHandler (ArcheryManager manager, EntityDamageEvent event, Player defender) { @@ -37,13 +35,7 @@ public class DazeEventHandler { protected void handleDazeEffect() { Location location = defender.getLocation(); - - if (Misc.getRandom().nextInt(100) > DAZE_CHANCE) { - location.setPitch(90); - } - else { - location.setPitch(-90); - } + location.setPitch(90 - Misc.getRandom().nextInt(181)); defender.teleport(location); defender.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 20 * 10, 10));