diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index bd0a5de..d0ddaf1 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 5870933..b5c4cec 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -3202,18 +3202,22 @@ public class GenericFunctions { pd.lastdamagetaken=dmg; pd.lasthitdesc=reason; ItemStack[] equips = p.getEquipment().getArmorContents(); + List equips_with_survivor = new ArrayList(); for (int i=0;i0) { + ItemStack equip = equips_with_survivor.get((int)(Math.random()*equips_with_survivor.size())); + //We can revive! + RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equip)/100d),p.getMaxHealth())); + ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equip); + AwakenedArtifact.setLV(equip, AwakenedArtifact.getLV(equip)-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!"); + } } return revived; }