Fixed temporary Artifact abilities consuming levels before instead of
after consumption.
This commit is contained in:
parent
56eb43c784
commit
3bf7b6e24b
Binary file not shown.
@ -437,10 +437,6 @@ public enum ArtifactAbility {
|
||||
item = applyEnchantment(ability,level+1,item);
|
||||
AwakenedArtifact.addAP(item, -1);
|
||||
p.sendMessage(ChatColor.AQUA+"Successfully applied "+ChatColor.BLUE+ability.GetName()+" "+(level+1)+ChatColor.AQUA+" to your artifact!");
|
||||
if (TwosideKeeper.TEMPORARYABILITIES.contains(ability)) {
|
||||
//Remove a level from using a temporary ability.
|
||||
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-1, p);
|
||||
}
|
||||
if (ability.equals(ArtifactAbility.GRACEFULDODGE)) {
|
||||
//Remove a level from using a temporary ability.
|
||||
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-10, p);
|
||||
|
@ -2731,6 +2731,7 @@ public class GenericFunctions {
|
||||
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
||||
if (Math.random()<=((16-tier)*0.1d)/100d) {
|
||||
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
|
||||
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-1, p);
|
||||
brokeone=true;
|
||||
break;
|
||||
}
|
||||
@ -2744,6 +2745,7 @@ public class GenericFunctions {
|
||||
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
||||
if (Math.random()<=((16-tier)*0.1d)/100d) {
|
||||
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);
|
||||
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-1, p);
|
||||
p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
|
||||
brokeone=true;
|
||||
}
|
||||
@ -3270,6 +3272,7 @@ public class GenericFunctions {
|
||||
//We can revive!
|
||||
RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equips[i])/100d),p.getMaxHealth()));
|
||||
ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equips[i]);
|
||||
AwakenedArtifact.setLV(equips[i], AwakenedArtifact.getLV(equips[i])-1, p);
|
||||
revived=true;
|
||||
Bukkit.broadcastMessage(ChatColor.GOLD+p.getName()+ChatColor.WHITE+" almost died... But came back to life!");
|
||||
aPlugin.API.discordSendRawItalicized(ChatColor.GOLD+p.getName()+ChatColor.WHITE+" almost died... But came back to life!");
|
||||
|
@ -345,7 +345,7 @@ public enum ItemSet {
|
||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Max Health");
|
||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Max Health");
|
||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+"+"+ItemSet.GetBaseAmount(set, tier, 4)+" Health Regen / 5 seconds");
|
||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Health Regen / 5 seconds");
|
||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Boosts All Modes of Ranger");
|
||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Close Range Mode:");
|
||||
lore.add(ChatColor.GRAY+" Increases Tumble Invincibility from");
|
||||
|
Loading…
x
Reference in New Issue
Block a user