Added visual effects for ability enabling. Also readded chat messages

for people who have particle effects disabled.
This commit is contained in:
GJ 2013-02-19 13:02:08 -05:00
parent 6e32843fb4
commit f189907ff8
4 changed files with 14 additions and 2 deletions

View File

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

View File

@ -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"));
}

View File

@ -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) {

View File

@ -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**