diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 05e4215..0c79b01 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index 76a7fe7..2fe4fe5 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.8.6a +version: 3.8.6b commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index 380f08f..4e66a88 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -421,7 +421,8 @@ public class CustomDamage { boolean applyDeathMark=false; - if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DEATHMARK, p.getEquipment().getItemInMainHand())>0) { + if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DEATHMARK, p.getEquipment().getItemInMainHand())>0 && + pd.last_deathmark+GenericFunctions.GetModifiedCooldown(TwosideKeeper.DEATHMARK_COOLDOWN,p) droplist, ItemStack goodie, Chests chest, Entity damager) { + public void KeepRollingForBosses(boolean isBoss, List droplist, ItemStack goodie, Chests chest, Player damager) { int roll=0; while (isBoss && !GenericFunctions.isEquip(goodie) && roll<50) { - goodie=chest.getSingleDrop(); + goodie=chest.getSingleDrop(damager); ModifyAndAddDropToList(droplist,goodie,damager); roll++; TwosideKeeper.Loot_Logger.AddCommonLoot(); @@ -300,7 +103,7 @@ public enum MonsterDifficulty { } private void ModifyAndAddDropToList(List droplist, ItemStack goodie, Entity damager) { - LivingEntity shooter = CustomDamage.getDamagerEntity(damager); + /*LivingEntity shooter = CustomDamage.getDamagerEntity(damager); if (shooter instanceof Player) { Player p = (Player)shooter; if (isValidSetItem(goodie)) { @@ -321,7 +124,7 @@ public enum MonsterDifficulty { } } } - TwosideKeeper.log("Adding item "+goodie, 2); + TwosideKeeper.log("Adding item "+goodie, 2);*/ //LEGACY CODE. droplist.add(goodie); } @@ -336,8 +139,8 @@ public enum MonsterDifficulty { return true; } - private ItemStack ConvertSetPieceIfNecessary(ItemStack goodie, ItemSet set) { - /*if ((set==ItemSet.JAMDAK || + public static ItemStack ConvertSetPieceIfNecessary(ItemStack goodie, ItemSet set) { + if ((set==ItemSet.JAMDAK || set==ItemSet.ALIKAHN || set==ItemSet.DARNYS || set==ItemSet.LORASAADI) && @@ -352,7 +155,12 @@ public enum MonsterDifficulty { set==ItemSet.LORASAADI) && GenericFunctions.isArmor(goodie)) { goodie.setType(Material.valueOf("IRON_"+goodie.getType().name().split("_")[1])); - }*/ + } else + if (goodie.getType()!=Material.SKULL_ITEM && + (set==ItemSet.MOONSHADOW || + set==ItemSet.GLADOMAIN)) { + goodie.setType(Material.SKULL_ITEM); + } return goodie; } @@ -364,7 +172,7 @@ public enum MonsterDifficulty { } } - public ItemSet PickAnItemSet(PlayerMode pm, ItemStack item) { + public static ItemSet PickAnItemSet(PlayerMode pm) { ItemSet set; switch (pm) { case STRIKER:{ @@ -414,7 +222,7 @@ public enum MonsterDifficulty { return set; } - private ItemSet PickRandomSet() { + public static ItemSet PickRandomSet() { final int NUMBER_OF_MODES=5; int totalweight=50*NUMBER_OF_MODES; //50 for each mode. int selectweight=(int)(Math.random()*totalweight); diff --git a/src/sig/plugin/TwosideKeeper/Logging/LootLogger.java b/src/sig/plugin/TwosideKeeper/Logging/LootLogger.java index e50cc80..fb80c9c 100644 --- a/src/sig/plugin/TwosideKeeper/Logging/LootLogger.java +++ b/src/sig/plugin/TwosideKeeper/Logging/LootLogger.java @@ -28,9 +28,9 @@ public class LootLogger { DecimalFormat df = new DecimalFormat("0.0"); if (total_rolls>0) { return "Total Rolls: "+ChatColor.AQUA+(total_rolls)+"\n"+ChatColor.WHITE - + "Total Common Rolls: "+ChatColor.YELLOW+(common_loot)+ChatColor.GREEN+" ("+df.format(((double)common_loot/(total_rolls))*100)+"%)\n"+ChatColor.WHITE - + "Total Rare Rolls: "+ChatColor.YELLOW+(rare_loot)+ChatColor.GREEN+" ("+df.format(((double)rare_loot/(total_rolls))*100)+"%)\n"+ChatColor.WHITE - + "Total Legendary Rolls: "+ChatColor.YELLOW+(legendary_loot)+ChatColor.GREEN+" ("+df.format(((double)legendary_loot/(total_rolls))*100)+"%)"; + + "Total Bonus Drops: "+ChatColor.YELLOW+(common_loot)+ChatColor.GREEN+" ("+df.format(((double)common_loot/(total_rolls))*100)+"%)\n"+ChatColor.WHITE + /*+ "Total Rare Rolls: "+ChatColor.YELLOW+(rare_loot)+ChatColor.GREEN+" ("+df.format(((double)rare_loot/(total_rolls))*100)+"%)\n"+ChatColor.WHITE + + "Total Legendary Rolls: "+ChatColor.YELLOW+(legendary_loot)+ChatColor.GREEN+" ("+df.format(((double)legendary_loot/(total_rolls))*100)+"%)"*/; } else { return "Not enough data yet!"; } diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java index 59f7124..dc221fc 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java @@ -387,6 +387,28 @@ public final class TwosideKeeperAPI { public static String getLocalizedItemName(Material i) { return GenericFunctions.UserFriendlyMaterialName(i); } + /** + * Returns a localized standard name of the entity, including the shooter + * in parenthesis if it's a projectile shot at someone. + * @param ent + * @return + */ + public static String getEntityName(Entity ent) { + return GenericFunctions.GetEntityDisplayName(ent); + } + /** + * Returns the actual custom name of the monster without the suffix/buff bar + * attached to it. This also returns the basic name of an entity if it does + * not have a custom name already. + * @param ent + * @return + */ + public static String getActualCustomName(LivingEntity ent) { + return GenericFunctions.getDisplayName(ent); + } + public static String getActionBarSuffix(LivingEntity ent) { + return ActionBarBuffUpdater.getActionBarPrefix(ent); + } /** * @deprecated Use the version that requires a short. Using a byte makes no sense * as durability can be larger than 256.