diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index a4dcd47..4bc9f34 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java b/src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java index c4d3c96..1010911 100644 --- a/src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java +++ b/src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java @@ -50,6 +50,11 @@ public class ActionBarBuffUpdater{ effectString.append(AppendAmplifier((int)(pd.damagepool-1))); effectString.append(" "); } + if (pd.lastvendettastack+200>TwosideKeeper.getServerTickTime()) { + effectString.append(ChatColor.GRAY+"☉"); + effectString.append(AppendAmplifier(((int)((pd.lastvendettastack+200)-TwosideKeeper.getServerTickTime())/20)-1,false)); + effectString.append(" "); + } if (pd.swiftaegisamt>4) { effectString.append(ChatColor.YELLOW+"❈"); effectString.append(AppendAmplifier((int)(GenericFunctions.getSwiftAegisAmt((Player)p)-1))); diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index f6ae30f..6f42b45 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -422,12 +422,13 @@ public class CustomDamage { if (PlayerMode.isDefender(p)) { GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 20*5, 4); if (p.isBlocking() && ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)) { - pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.25; + ApplyVendettaStackTimer(pd); + pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.40; if (TwosideKeeper.getMaxThornsLevelOnEquipment(target)>0) { pd.thorns_amt+=((1-CalculateDamageReduction(1,target,damager))*pd.lastrawdamage)*0.01; } DecimalFormat df = new DecimalFormat("0.00"); - GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored",true); + GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+" Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored",true); } } if (getDamagerEntity(damager) instanceof Enderman) { @@ -656,12 +657,17 @@ public class CustomDamage { return damage; } + private static void ApplyVendettaStackTimer(PlayerStructure pd) { + if (pd.vendetta_amt<=0) {pd.lastvendettastack=TwosideKeeper.getServerTickTime();} + } + private static void AwardDamageAchievement(Player p, double dmg) { if (p.hasAchievement(Achievement.ENCHANTMENTS) && dmg>18 && !p.hasAchievement(Achievement.OVERKILL)) { p.awardAchievement(Achievement.OVERKILL); } } + @SuppressWarnings("deprecation") private static void applyWitherSkeletonWither(Entity damager, Player p) { Skeleton sk = (Skeleton)getDamagerEntity(damager); if (sk.getSkeletonType()==SkeletonType.WITHER) { @@ -697,6 +703,7 @@ public class CustomDamage { } } + @SuppressWarnings("deprecation") public static void applyCaveSpiderPoison(Entity damager, Player p) { int poisonlv=1; MonsterDifficulty md = MonsterController.getMonsterDifficulty((CaveSpider)getDamagerEntity(damager)); @@ -1096,11 +1103,20 @@ public class CustomDamage { static void applyDefenderAggro(Monster m, Player p) { if (PlayerMode.isDefender(p)) { + RefreshVendettaStackTimer(p); setMonsterTarget(m,p); setAggroGlowTickTime(m,100); } } + private static void RefreshVendettaStackTimer(Player p) { + PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + if (pd.lastvendettastack+1000) { pd.thorns_amt+=((1-CalculateDamageReduction(1,target,damager))*(rawdmg*0.01)); } DecimalFormat df = new DecimalFormat("0.00"); - GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+"Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored",true); + GenericFunctions.sendActionBarMessage(p, ChatColor.YELLOW+" Vendetta: "+ChatColor.GREEN+Math.round(pd.vendetta_amt)+((pd.thorns_amt>0)?"/"+ChatColor.GOLD+df.format(pd.thorns_amt):"")+ChatColor.GREEN+" dmg stored",true); } return true; } diff --git a/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java b/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java index 6b3f71c..3d00941 100644 --- a/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java +++ b/src/sig/plugin/TwosideKeeper/Drops/SigDrop.java @@ -7,6 +7,7 @@ import org.bukkit.inventory.ItemStack; import aPlugin.Drop; import sig.plugin.TwosideKeeper.TwosideKeeper; import sig.plugin.TwosideKeeper.HelperStructures.ItemSet; +import sig.plugin.TwosideKeeper.HelperStructures.LivingEntityDifficulty; import sig.plugin.TwosideKeeper.HelperStructures.Loot; import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty; import sig.plugin.TwosideKeeper.HelperStructures.PlayerMode; @@ -24,11 +25,11 @@ public class SigDrop extends Drop{ boolean isHardened; //If set to false, it has no breaks remaining. boolean isSet; //If set to false, it's non-set. int isWeapon; //0: Armor, 1: Weapon, 2: Tool - MonsterDifficulty diff; + LivingEntityDifficulty diff; - public SigDrop(int amount, int weight, String description, boolean isHardened, boolean isSet, int isWeapon, MonsterDifficulty diff) { + public SigDrop(int amount, int weight, String description, boolean isHardened, boolean isSet, int isWeapon, LivingEntityDifficulty normal) { super(amount, weight, - "["+GenericFunctions.CapitalizeFirstLetters(diff.name().replace("_", " "))+"]"+ + "["+GenericFunctions.CapitalizeFirstLetters(normal.name().replace("_", " "))+"]"+ ((isHardened)?" Hardened":"")+ " Mega"+ (isSet?" Set":"")+ @@ -37,7 +38,7 @@ public class SigDrop extends Drop{ this.isHardened=isHardened; this.isSet=isSet; this.isWeapon=isWeapon; - this.diff=diff; + this.diff=normal; } @Override @@ -140,11 +141,11 @@ public class SigDrop extends Drop{ return item; } - public ItemStack CreateModifiedLootPiece(Player p, ItemStack item, MonsterDifficulty md) { + public ItemStack CreateModifiedLootPiece(Player p, ItemStack item, LivingEntityDifficulty diff2) { if (isSet) { - ItemSet set = MonsterDifficulty.PickAnItemSet(PlayerMode.getPlayerMode(p),md); //This is the set we have to generate. + ItemSet set = LivingEntityDifficulty.PickAnItemSet(PlayerMode.getPlayerMode(p),diff2); //This is the set we have to generate. //Turn it into the appropriate piece if necessary. - item = MonsterDifficulty.ConvertSetPieceIfNecessary(item, set); + item = LivingEntityDifficulty.ConvertSetPieceIfNecessary(item, set); int tierbonus=0; if (item.getType().name().contains("LEATHER")) { @@ -158,8 +159,8 @@ public class SigDrop extends Drop{ return item; } - private int GetTierBonusBasedOnDifficulty(MonsterDifficulty dif) { - switch (dif) { + private int GetTierBonusBasedOnDifficulty(LivingEntityDifficulty diff2) { + switch (diff2) { case DANGEROUS:{ if (Math.random()<=1/3d) { return 1; diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java index bcfe1fb..2017ab3 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java @@ -306,10 +306,12 @@ public enum ItemSet { lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Absorption Health (30 seconds)"); lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage Reduction"); lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Vendetta"); - lore.add(ChatColor.GRAY+" Blocking stores 25% of mitigation damage."); + lore.add(ChatColor.GRAY+" Blocking stores 40% of mitigation damage."); lore.add(ChatColor.GRAY+" 1% of damage is stored as thorns true damage."); lore.add(ChatColor.GRAY+" Shift+Left-Click with a shield to unleash"); lore.add(ChatColor.GRAY+" all of your stored mitigation damage."); + lore.add(ChatColor.GRAY+" Vendetta stacks wear off after 10 seconds."); + lore.add(ChatColor.GRAY+" Can be refreshed by basic attacking monsters."); }break; case DAWNTRACKER:{ lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:"); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java index c1b019a..5e6b999 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java @@ -41,13 +41,13 @@ public class Loot { aPlugin.API.Chests.LOOT_NORMAL.addDrop(new DropMaterial(Material.ENDER_PEARL,1,8)); aPlugin.API.Chests.LOOT_NORMAL.addDrop(new DropMaterial(Material.ENDER_CHEST,4)); aPlugin.API.Chests.LOOT_NORMAL.addDrop(new DropItem(Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE),4)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,18,"[Normal] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.NORMAL)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,19,"[Normal] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.NORMAL)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.NORMAL)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.NORMAL)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,2,"[Normal] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,MonsterDifficulty.NORMAL)); - /*aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.NORMAL)); - aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,2,"[Normal] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,18,"[Normal] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,19,"[Normal] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,2,"[Normal] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.NORMAL)); + /*aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.NORMAL)); + aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,2,"[Normal] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.NORMAL)); aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.NORMAL)); aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.NORMAL)); aPlugin.API.Chests.LOOT_NORMAL.addDrop(new SigDrop(1,1,"[Normal] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.NORMAL));*/ @@ -76,16 +76,16 @@ public class Loot { aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new DropMaterial(Material.IRON_INGOT,91800)); aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new DropMaterial(Material.IRON_BLOCK,7800)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,1800,"[Dangerous] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,7800,"[Dangerous] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,200,"[Dangerous] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,200,"[Dangerous] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,600,"[Dangerous] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,180,"[Dangerous] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,780,"[Dangerous] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,20,"[Dangerous] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,20,"[Dangerous] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.DANGEROUS)); - aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,60,"[Dangerous] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,1800,"[Dangerous] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,7800,"[Dangerous] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,200,"[Dangerous] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,200,"[Dangerous] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,600,"[Dangerous] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,180,"[Dangerous] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,780,"[Dangerous] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,20,"[Dangerous] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,20,"[Dangerous] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.DANGEROUS)); + aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new SigDrop(1,60,"[Dangerous] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DANGEROUS)); aPlugin.API.Chests.LOOT_DANGEROUS.addDrop(new DropItem(Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE),400)); aPlugin.API.Chests.LOOT_DANGEROUS.printDrops(); @@ -96,16 +96,16 @@ public class Loot { aPlugin.API.Chests.LOOT_DEADLY.addDrop(new DropMaterial(Material.DIAMOND_BLOCK,7800)); aPlugin.API.Chests.LOOT_DEADLY.addDrop(new DropMaterial(Material.GOLD_INGOT,7800)); aPlugin.API.Chests.LOOT_DEADLY.addDrop(new DropMaterial(Material.DIAMOND_SWORD,800)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,1800,"[Deadly] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,7800,"[Deadly] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,200,"[Deadly] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,200,"[Deadly] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,600,"[Deadly] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,360,"[Deadly] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,1560,"[Deadly] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,40,"[Deadly] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,40,"[Deadly] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.DEADLY)); - aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,120,"[Deadly] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,1800,"[Deadly] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,7800,"[Deadly] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,200,"[Deadly] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,200,"[Deadly] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,600,"[Deadly] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,360,"[Deadly] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,1560,"[Deadly] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,40,"[Deadly] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,40,"[Deadly] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.DEADLY)); + aPlugin.API.Chests.LOOT_DEADLY.addDrop(new SigDrop(1,120,"[Deadly] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.DEADLY)); aPlugin.API.Chests.LOOT_DEADLY.addDrop(new DropItem(Artifact.createArtifactItem(ArtifactItem.LOST_CORE),400)); aPlugin.API.Chests.LOOT_DEADLY.printDrops(); @@ -115,30 +115,30 @@ public class Loot { aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new DropMaterial(Material.EMERALD_BLOCK,7800)); aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new DropMaterial(Material.DIAMOND_BLOCK,1,2,7800)); aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new DropMaterial(Material.GOLD_BLOCK,7800)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,1800,"[Hellfire] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,7800,"[Hellfire] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,200,"[Hellfire] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,200,"[Hellfire] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,600,"[Hellfire] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,540,"[Hellfire] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,2340,"[Hellfire] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,60,"[Hellfire] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,60,"[Hellfire] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.HELLFIRE)); - aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,180,"[Hellfire] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,1800,"[Hellfire] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,7800,"[Hellfire] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,200,"[Hellfire] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,200,"[Hellfire] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,600,"[Hellfire] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,540,"[Hellfire] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,2340,"[Hellfire] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,60,"[Hellfire] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,60,"[Hellfire] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.HELLFIRE)); + aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new SigDrop(1,180,"[Hellfire] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.HELLFIRE)); aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new DropItem(Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE),400)); aPlugin.API.Chests.LOOT_HELLFIRE.addDrop(new DropItem(TwosideKeeper.HUNTERS_COMPASS.getItemStack(),400)); aPlugin.API.Chests.LOOT_HELLFIRE.printDrops(); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,1800,"[End] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,7800,"[End] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,200,"[End] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,200,"[End] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,600,"[End] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,540,"[End] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,2340,"[End] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,60,"[End] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,60,"[End] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,MonsterDifficulty.END)); - aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,180,"[End] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,MonsterDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,1800,"[End] Mega Armor",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,7800,"[End] Mega Set Armor",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,200,"[End] Mega Tool",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,200,"[End] Mega Weapon",SigDrop.NONHARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,600,"[End] Mega Set Weapon",SigDrop.NONHARDENED,SigDrop.SET,SigDrop.WEAPON,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,540,"[End] Hardened Mega Armor",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.ARMOR,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,2340,"[End] Hardened Mega Set Armor",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,60,"[End] Hardened Mega Tool",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.TOOL,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,60,"[End] Hardened Mega Weapon",SigDrop.HARDENED,SigDrop.NONSET,SigDrop.WEAPON,LivingEntityDifficulty.END)); + aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new SigDrop(1,180,"[End] Hardened Mega Set Weapon",SigDrop.HARDENED,SigDrop.SET,SigDrop.ARMOR,LivingEntityDifficulty.END)); aPlugin.API.Chests.LOOT_CUSTOM.addDrop(new DropItem(Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE),400)); aPlugin.API.Chests.LOOT_CUSTOM.printDrops(); diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/BlockUtils.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/BlockUtils.java index db6886c..dc07b56 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/BlockUtils.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/BlockUtils.java @@ -6,6 +6,7 @@ import org.bukkit.block.BlockFace; import org.bukkit.material.Chest; public class BlockUtils { + @SuppressWarnings("deprecation") public static boolean LocationInFrontOfBlockIsFree(Block b) { if (b.getType()==Material.CHEST || b.getType()==Material.TRAPPED_CHEST || @@ -20,6 +21,7 @@ public class BlockUtils { } } + @SuppressWarnings("deprecation") public static BlockFace GetBlockFacingDirection(Block b) { if (b.getType()==Material.CHEST || b.getType()==Material.TRAPPED_CHEST || @@ -32,6 +34,7 @@ public class BlockUtils { } } + @SuppressWarnings("deprecation") public static Block GetBlockInFrontOfBlock(Block b) { if (b.getType()==Material.CHEST || b.getType()==Material.TRAPPED_CHEST || diff --git a/src/sig/plugin/TwosideKeeper/MonsterController.java b/src/sig/plugin/TwosideKeeper/MonsterController.java index 59f90d6..af8c266 100644 --- a/src/sig/plugin/TwosideKeeper/MonsterController.java +++ b/src/sig/plugin/TwosideKeeper/MonsterController.java @@ -207,6 +207,8 @@ public class MonsterController { case SKELETON:{ hpincrease+=20; }break; + default: + break; } ent.setMaxHealth(ent.getMaxHealth()+hpincrease); ent.setHealth(ent.getMaxHealth()); @@ -715,7 +717,7 @@ public class MonsterController { } public static boolean isZombieLeader(LivingEntity ent) { - if ((ent instanceof PigZombie)) { + if ((ent instanceof PigZombie) && ent.getWorld().getName().equalsIgnoreCase("world_nether")) { MonsterDifficulty md = getMonsterDifficulty((Monster)ent); if ( diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index ce48904..df18eda 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -119,6 +119,9 @@ public class PlayerStructure { public double damagepool=0; public long lastattacked=0; public int lasthitfromdamagepool=0; + public long lastvendettastack=0; + public long lastlavaplume=0; + public long usetimer=0; public long iframetime = 0; diff --git a/src/sig/plugin/TwosideKeeper/Recipes.java b/src/sig/plugin/TwosideKeeper/Recipes.java index 41f585d..8b1881f 100644 --- a/src/sig/plugin/TwosideKeeper/Recipes.java +++ b/src/sig/plugin/TwosideKeeper/Recipes.java @@ -260,6 +260,11 @@ public class Recipes { piercingarrow_recipe.addIngredient(Material.STICK); piercingarrow_recipe.addIngredient(Material.FEATHER); Bukkit.addRecipe(piercingarrow_recipe); + + ShapelessRecipe piercingarrow2_recipe = new ShapelessRecipe(piercingarrow); + piercingarrow2_recipe.addIngredient(4,Material.REDSTONE); + piercingarrow2_recipe.addIngredient(Material.TIPPED_ARROW); + Bukkit.addRecipe(piercingarrow2_recipe); } public static void Initialize_NotchApple_Recipe() { diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index c78bd54..b37aa1c 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -374,8 +374,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener { public static final int SPAWN_DEBUG_LEVEL=5; public static final int LAVA_PLUME_COOLDOWN=60; - public static long last_lava_plume_time = 0; - public static final int DODGE_COOLDOWN=100; public static final int DEATHMARK_COOLDOWN=240; public static final int EARTHWAVE_COOLDOWN=100; @@ -413,7 +411,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener { public static List log_messages=new ArrayList(); public static List temporary_lava_list = new ArrayList(); public static List temporary_chunks = new ArrayList(); - long LastClearStructureTime = 0; public int TeamCounter = 0; @@ -2634,7 +2631,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener { //The rest of the hashmap goes back in the original inventory. if (!fit) { - ev.getPlayer().sendMessage(ChatColor.RED+"Attempted to store your items, not all of them could fit!"+ChatColor.WHITE+" Stored "+ChatColor.AQUA+count+ChatColor.WHITE+" items."); + PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + if (pd.usetimer+50) { ev.getPlayer().sendMessage("Stored "+ChatColor.AQUA+count+ChatColor.WHITE+" items inside the chest."); diff --git a/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java b/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java index c02fbb7..b90fa71 100644 --- a/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java +++ b/src/sig/plugin/TwosideKeeper/runServerHeartbeat.java @@ -274,6 +274,9 @@ final class runServerHeartbeat implements Runnable { pd.thorns_amt=0; pd.weaponcharges=0; } + if (pd.vendetta_amt>0 && pd.lastvendettastack+200=0) {