diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index ec54a65..74bd496 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -5020,6 +5020,7 @@ public void payDay(int time) return 0; } } + public void setLv30Choice(Player p, String arg1, String arg2) { if (getJobLv(arg1, p)>=30) { if (arg2.equals("1") || arg2.equals("2")) { @@ -5043,6 +5044,33 @@ public void payDay(int time) notifyBuffMessages(p, 20); } + public ItemStack convertArtifact(ItemStack artifact) { + //Converts an artifact into a really good piece of equipment. Decide the equipment style. + int style = (int)(Math.random()*3); + boolean diamond=false; + if (Math.random()<=0.35) { + diamond=true; //35% chance of the item being diamond. Otherwise it's iron. + } + if (Math.random()<=0.95) { + switch (style) { + case 0: { + //Adds 1 Level 8 enchantment and a Level 4 sub-enchant. + + }break; + case 1: { + //Adds many lower-level enchantments altogether. (Between Levels 2-4) + + }break; + case 2: { + //Only two focused bonus enchants. One if very highly specced, the other is average. + + }break; + } + } else { + //This is an actual Artifact piece. Has extremely strong stats with very high durability. + + } + } private static Method getMethod(Class cl, String method) { diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 1d01a8a..e3ae86c 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -9961,6 +9961,27 @@ implements Listener if (p.hasPermission("group.administrators")) { p.getScoreboard().getTeam(p.getName()).setPrefix(ChatColor.DARK_PURPLE+""); } + + //*****************************// Job buffs here + if (event.getSlotType()==SlotType.RESULT && (event.getInventory().getType()==InventoryType.CRAFTING || event.getInventory().getType()==InventoryType.PLAYER || event.getInventory().getType()==InventoryType.WORKBENCH)) { + //Check if level 5 digger. + if (this.plugin.hasJobBuff("Digger", p, Job.JOB5) && event.getCurrentItem().getType()==Material.CLAY_BALL) { + //This could potentially be an artifact. Check the lore. + ItemStack result = event.getCurrentItem(); + if (result.hasItemMeta() && result.getItemMeta().hasLore()) { + if (result.getItemMeta().getLore().contains("This clump of material seems to")) { + //This is an artifact. There is a 7.5% chance of it turning into an equipment. + if (Math.random()<=0.075) { + event.setCurrentItem(stack) + } + } + } + } + } + + + //****************************//End job buffs. + if (event.getCursor()!=null || event.getCurrentItem()!=null) { if (event.getCursor().getType()==Material.SULPHUR) { //This is a broken Halloween item...Maybe. Let's find out.