瀏覽代碼

Added visual effects for ability enabling. Also readded chat messages
for people who have particle effects disabled.

GJ 12 年之前
父節點
當前提交
f189907ff8

+ 1 - 0
src/main/java/com/gmail/nossr50/skills/archery/DazeEventHandler.java

@@ -48,6 +48,7 @@ public class DazeEventHandler {
     }
 
     protected void sendAbilityMessages() {
+        defender.sendMessage(LocaleLoader.getString("Combat.TouchedFuzzy"));
         manager.getMcMMOPlayer().getPlayer().sendMessage(LocaleLoader.getString("Combat.TargetDazed"));
     }
 }

+ 4 - 0
src/main/java/com/gmail/nossr50/skills/swords/BleedEventHandler.java

@@ -8,11 +8,13 @@ import com.gmail.nossr50.skills.runnables.BleedTimer;
 import com.gmail.nossr50.skills.utilities.SkillTools;
 
 public class BleedEventHandler {
+    private SwordsManager manager;
     private int skillLevel;
     private LivingEntity defender;
     protected int skillModifier;
 
     protected BleedEventHandler(SwordsManager manager, LivingEntity defender) {
+        this.manager = manager;
         this.skillLevel = manager.getSkillLevel();
         this.defender = defender;
 
@@ -37,6 +39,8 @@ public class BleedEventHandler {
     }
 
     protected void sendAbilityMessages() {
+        manager.getMcMMOPlayer().getPlayer().sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding"));
+
         if (defender instanceof Player) {
             ((Player) defender).sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding.Started"));
         }

+ 8 - 2
src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java

@@ -3,6 +3,7 @@ package com.gmail.nossr50.skills.utilities;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.bukkit.Effect;
 import org.bukkit.Material;
 import org.bukkit.block.Block;
 import org.bukkit.enchantments.Enchantment;
@@ -12,8 +13,10 @@ import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.PlayerInventory;
 import org.bukkit.inventory.meta.ItemMeta;
 import org.bukkit.plugin.PluginManager;
+import org.bukkit.potion.Potion;
 import org.bukkit.potion.PotionEffect;
 import org.bukkit.potion.PotionEffectType;
+import org.bukkit.potion.PotionType;
 import org.getspout.spoutapi.SpoutManager;
 import org.getspout.spoutapi.player.SpoutPlayer;
 
@@ -196,6 +199,7 @@ public class SkillTools {
 
                 profile.setAbilityMode(ability, false);
                 profile.setAbilityInformed(ability, false);
+                player.playEffect(player.getEyeLocation(), Effect.POTION_BREAK, new Potion(PotionType.STRENGTH));
                 player.sendMessage(ability.getAbilityOff());
 
                 sendSkillMessage(player, ability.getAbilityPlayerOff(player));
@@ -385,11 +389,13 @@ public class SkillTools {
         }
 
         if (!profile.getAbilityMode(ability) && cooldownOver(profile.getSkillDATS(ability), ability.getCooldown(), player)) {
-            player.sendMessage(ability.getAbilityOn());
+            int ticks = PerksUtils.handleActivationPerks(player, 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel), ability.getMaxTicks());
 
+            player.playEffect(player.getEyeLocation(), Effect.POTION_BREAK, new Potion(PotionType.POISON));
+            player.sendMessage(ability.getAbilityOn());
             SkillTools.sendSkillMessage(player, ability.getAbilityPlayer(player));
 
-            profile.setSkillDATS(ability, System.currentTimeMillis() + (PerksUtils.handleActivationPerks(player, 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel), ability.getMaxTicks()) * Misc.TIME_CONVERSION_FACTOR));
+            profile.setSkillDATS(ability, System.currentTimeMillis() + (ticks * Misc.TIME_CONVERSION_FACTOR));
             profile.setAbilityMode(ability, true);
 
             if (ability == AbilityType.BERSERK) {

+ 1 - 0
src/main/resources/locale/locale_en_US.properties

@@ -254,6 +254,7 @@ Swords.Combat.Bleed.Length=[[RED]]Bleed Length: [[YELLOW]]{0} ticks
 Swords.Combat.Bleed.Note=[[GRAY]]NOTE: [[YELLOW]]1 Tick happens every 2 seconds
 Swords.Combat.Bleeding.Started=[[DARK_RED]] You're bleeding!
 Swords.Combat.Bleeding.Stopped=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]!
+Swords.Combat.Bleeding=[[GREEN]]**ENEMY BLEEDING**
 Swords.Combat.Counter.Chance=[[RED]]Counter Attack Chance: [[YELLOW]]{0}
 Swords.Combat.Counter.Hit=[[DARK_RED]]Hit with a counter-attack!
 Swords.Combat.Countered=[[GREEN]]**COUNTER-ATTACKED**