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);
|
item = applyEnchantment(ability,level+1,item);
|
||||||
AwakenedArtifact.addAP(item, -1);
|
AwakenedArtifact.addAP(item, -1);
|
||||||
p.sendMessage(ChatColor.AQUA+"Successfully applied "+ChatColor.BLUE+ability.GetName()+" "+(level+1)+ChatColor.AQUA+" to your artifact!");
|
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)) {
|
if (ability.equals(ArtifactAbility.GRACEFULDODGE)) {
|
||||||
//Remove a level from using a temporary ability.
|
//Remove a level from using a temporary ability.
|
||||||
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-10, p);
|
AwakenedArtifact.setLV(item, AwakenedArtifact.getLV(item)-10, p);
|
||||||
|
@ -2731,6 +2731,7 @@ public class GenericFunctions {
|
|||||||
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
||||||
if (Math.random()<=((16-tier)*0.1d)/100d) {
|
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)));
|
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;
|
brokeone=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2744,6 +2745,7 @@ public class GenericFunctions {
|
|||||||
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
|
||||||
if (Math.random()<=((16-tier)*0.1d)/100d) {
|
if (Math.random()<=((16-tier)*0.1d)/100d) {
|
||||||
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);
|
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)));
|
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;
|
brokeone=true;
|
||||||
}
|
}
|
||||||
@ -3270,6 +3272,7 @@ public class GenericFunctions {
|
|||||||
//We can revive!
|
//We can revive!
|
||||||
RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equips[i])/100d),p.getMaxHealth()));
|
RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equips[i])/100d),p.getMaxHealth()));
|
||||||
ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equips[i]);
|
ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equips[i]);
|
||||||
|
AwakenedArtifact.setLV(equips[i], AwakenedArtifact.getLV(equips[i])-1, p);
|
||||||
revived=true;
|
revived=true;
|
||||||
Bukkit.broadcastMessage(ChatColor.GOLD+p.getName()+ChatColor.WHITE+" almost died... But came back to life!");
|
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!");
|
aPlugin.API.discordSendRawItalicized(ChatColor.GOLD+p.getName()+ChatColor.WHITE+" almost died... But came back to life!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user