Complete Alchemist kit
This commit is contained in:
parent
3ffd2966b6
commit
e9c3aebf90
@ -2,7 +2,12 @@ package nautilus.game.arcade.game.games.castleassault.kits;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
@ -12,21 +17,130 @@ public class KitAlchemist extends KitPlayer
|
||||
{
|
||||
public KitAlchemist(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Alchemist", KitAvailability.Free, new String[] {}, new Perk[] {}, Material.POTION);
|
||||
super(manager, "Alchemist", KitAvailability.Free,
|
||||
new String[]
|
||||
{
|
||||
C.cGrayB + "Starting Kit:",
|
||||
C.cGray + "Diamond Sword",
|
||||
C.cGray + "Diamond Helmet, Iron Chestplate, Iron Leggings, Diamond Boots",
|
||||
C.cGray + "Speed I Potion",
|
||||
C.cGreenB + "Passive Ability:",
|
||||
C.cGreen + "Netherborne: Permanent Fire Resistance"
|
||||
},
|
||||
new Perk[][]
|
||||
{
|
||||
new Perk[] {},
|
||||
new Perk[] {},
|
||||
new Perk[] {},
|
||||
new Perk[] {},
|
||||
new Perk[] {},
|
||||
new Perk[] {}
|
||||
},
|
||||
new String[][]
|
||||
{
|
||||
{
|
||||
C.cGray + "Receive a Regeneration II Potion"
|
||||
},
|
||||
{
|
||||
C.cGray + "Obtain a time extension on your Speed I Potion"
|
||||
},
|
||||
{
|
||||
C.cGray + "Obtain a time extension on your Regeneration II Potion"
|
||||
},
|
||||
{
|
||||
C.cGray + "Receive a Resistance I Potion"
|
||||
},
|
||||
{
|
||||
C.cGray + "Obtain a time extension on your Resistance I Potion"
|
||||
}
|
||||
},
|
||||
Material.POTION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
player.getInventory().setItem(0, new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build());
|
||||
giveRegeneration(player);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 100000, 0));
|
||||
|
||||
player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build());
|
||||
|
||||
int level = getUpgradeLevel(player.getUniqueId());
|
||||
if (level == 0)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8194).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8193).build());
|
||||
player.getInventory().setHelmet(new ItemBuilder(Material.IRON_HELMET).setUnbreakable(true).build());
|
||||
player.getInventory().setChestplate(new ItemBuilder(Material.IRON_CHESTPLATE).setUnbreakable(true).build());
|
||||
player.getInventory().setLeggings(new ItemBuilder(Material.IRON_LEGGINGS).setUnbreakable(true).build());
|
||||
player.getInventory().setBoots(new ItemBuilder(Material.IRON_BOOTS).setUnbreakable(true).build());
|
||||
}
|
||||
else if (level == 1)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8194).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8225).build());
|
||||
}
|
||||
else if (level == 2)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8258).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8225).build());
|
||||
}
|
||||
else if (level == 3)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8258).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8289).build());
|
||||
}
|
||||
else if (level == 4)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8258).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8289).build());
|
||||
ItemStack item = new ItemBuilder(Material.POTION).setData((short)8205).build();
|
||||
PotionMeta pm = (PotionMeta) item.getItemMeta();
|
||||
pm.clearCustomEffects();
|
||||
pm.addCustomEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20 * 60, 0), true);
|
||||
item.setItemMeta(pm);
|
||||
player.getInventory().addItem(item);
|
||||
}
|
||||
else if (level == 5)
|
||||
{
|
||||
player.getInventory().setItem(1, new ItemBuilder(Material.POTION).setData((short)8258).build());
|
||||
player.getInventory().setItem(2, new ItemBuilder(Material.POTION).setData((short)8289).build());
|
||||
ItemStack item = new ItemBuilder(Material.POTION).setData((short)8205).build();
|
||||
PotionMeta pm = (PotionMeta) item.getItemMeta();
|
||||
pm.clearCustomEffects();
|
||||
pm.addCustomEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20 * 130, 0), true);
|
||||
item.setItemMeta(pm);
|
||||
player.getInventory().addItem(item);
|
||||
}
|
||||
|
||||
player.getInventory().setHelmet(new ItemBuilder(Material.DIAMOND_HELMET).setLore(C.cGold + "Kit Item").setUnbreakable(true).build());
|
||||
player.getInventory().setChestplate(new ItemBuilder(Material.IRON_CHESTPLATE).setLore(C.cGold + "Kit Item").setUnbreakable(true).build());
|
||||
player.getInventory().setLeggings(new ItemBuilder(Material.IRON_LEGGINGS).setLore(C.cGold + "Kit Item").setUnbreakable(true).build());
|
||||
player.getInventory().setBoots(new ItemBuilder(Material.DIAMOND_BOOTS).setLore(C.cGold + "Kit Item").setUnbreakable(true).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void awardKillStreak(Player player, int streak) {}
|
||||
public void awardKillStreak(Player player, int streak)
|
||||
{
|
||||
if (streak == 2)
|
||||
{
|
||||
player.sendMessage(C.cRedB + "You have received a Slowness I Splash Potion as a Kill Streak Reward!");
|
||||
player.getInventory().addItem(new ItemBuilder(Material.POTION).setData((short)16394).build());
|
||||
}
|
||||
else if (streak == 4)
|
||||
{
|
||||
player.sendMessage(C.cRedB + "You have received a Weakness I Splash Potion as a Kill Streak Reward!");
|
||||
player.getInventory().addItem(new ItemBuilder(Material.POTION).setData((short)16392).build());
|
||||
}
|
||||
else if (streak == 6)
|
||||
{
|
||||
player.sendMessage(C.cRedB + "You have received 4 Instant Damage II Splash Potions as a Kill Streak Reward!");
|
||||
player.getInventory().addItem(new ItemBuilder(Material.POTION, 4).setData((short)16428).build());
|
||||
}
|
||||
else if (streak == 8)
|
||||
{
|
||||
player.sendMessage(C.cRedB + "You have received a Regeneration III Potion as a Kill Streak Reward!");
|
||||
ItemStack item = new ItemBuilder(Material.POTION).setData((short)8193).build();
|
||||
PotionMeta pm = (PotionMeta) item.getItemMeta();
|
||||
pm.clearCustomEffects();
|
||||
pm.addCustomEffect(new PotionEffect(PotionEffectType.REGENERATION, 20 * 10, 2), true);
|
||||
item.setItemMeta(pm);
|
||||
player.getInventory().addItem(item);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user