Added Minestrike chests (this time to the right branch)

This commit is contained in:
LCastr0 2016-12-08 03:12:43 -02:00 committed by cnr
parent 7e2c4c8555
commit 8f50f0d833
6 changed files with 78 additions and 33 deletions

View File

@ -375,7 +375,7 @@ public class RewardManager
addGadget(Type.NORMAL, getGadget(ParticlePartyTime.class), rarity, 12);
//Game Modifiers MineStrike
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 200);
/*addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 200);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 200);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SSG_08_Blood_in_the_Water, rarity, 50);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Galil_AR_Eco, rarity, 20);
@ -386,7 +386,11 @@ public class RewardManager
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.PP_Bizon_Streak, rarity, 40);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.CZ75_Auto_Tigris, rarity, 100);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Steyr_AUG_Torque, rarity, 30);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.XM1014_Tranquility, rarity, 30);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.XM1014_Tranquility, rarity, 30);*/
for (MineStrikeSkin skin : MineStrikeSkin.values())
{
addMineStrikeSkin(Type.MINESTRIKE, skin, rarity, 200);
}
@ -552,7 +556,7 @@ public class RewardManager
addGadget(Type.NORMAL, getGadget(WinEffectRiseOfTheElderGuardian.class), rarity, 4);
//GameModifier MineStrike
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 8);
/*addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 8);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 8);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Desert_Eagle_Blaze, rarity, 10);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Glock_18_Fade, rarity, 20);
@ -561,7 +565,7 @@ public class RewardManager
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P250_Muertos, rarity, 20);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.FAMAS_Pulse, rarity, 33);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SG553_Pulse, rarity, 33);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AK_47_Vulcan, rarity, 5);
addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AK_47_Vulcan, rarity, 5);*/
//WINTER
@ -905,9 +909,7 @@ public class RewardManager
public Reward[] getRewards(Player player, RewardPool.Type pool, RewardType type)
{
int amount = 4;
if(type == RewardType.ILLUMINATED_CHEST || type == RewardType.FREEDOM_CHEST || type == RewardType.OMEGA_CHEST
|| type == RewardType.HAUNTED_CHEST || type == RewardType.GINGERBREAD_CHEST) amount = 1;
int amount = pool.getChestAmount();
int currentReward = 0;
Reward[] rewards = new Reward[amount];

View File

@ -53,29 +53,42 @@ public class RewardPool
NORMAL(true),
WINTER_HOLIDAY(true),
VALENTINES_GIFT(false),
ILLUMINATED(false),
FREEDOM(false),
OMEGA(false),
HAUNTED(false),
ILLUMINATED(false, 1),
FREEDOM(false, 1),
OMEGA(false, 1),
HAUNTED(false, 1),
TRICK_OR_TREAT(false),
INFUSED_CHESTS(false),
INFUSED_GADGETS(true),
MYTHICAL(true),
THANKFUL(false),
GINGERBREAD(false),
GINGERBREAD(false, 1),
MINESTRIKE(false, 1),
CARL_SPINNER(true);
private boolean _useDuplicates;
private int _chestAmount;
Type(boolean useDuplicates, int amount)
{
_useDuplicates = useDuplicates;
_chestAmount = amount;
}
Type(boolean useDuplicates)
{
_useDuplicates = useDuplicates;
this(useDuplicates, 4);
}
public boolean getUseDuplicates()
{
return _useDuplicates;
}
public int getChestAmount()
{
return _chestAmount;
}
public boolean canGive(Player player, Reward reward)
{

View File

@ -18,6 +18,7 @@ public enum RewardType
TRICK_OR_TREAT_CHEST(0.1, 2, 16, 0),
THANKFUL_CHEST( 0.1, 2, 16, 0),
GINGERBREAD_CHEST( 0, 2, 16, 0),
MINESTRIKE_CHEST( 0, 2, 16, 0),
VALENTINES_GIFT( 0, 7, 20, 20),
SPINNER_FILLER( 0.1, 1, 4, 20),

View File

@ -76,6 +76,13 @@ public enum TreasureStyle
ParticleType.SNOW_SHOVEL,
Sound.DIG_SNOW,
Sound.DIG_SNOW
),
MINESTRIKE(
ParticleType.FIREWORKS_SPARK,
ParticleType.FIREWORKS_SPARK,
ParticleType.FIREWORKS_SPARK,
Sound.EXPLODE,
Sound.EXPLODE
);
private ParticleType _secondaryParticle;

View File

@ -28,7 +28,9 @@ public enum TreasureType
THANKFUL(C.cGold + "Thankful Treasure", "Thankful Chest", "ThankFul", RewardType.THANKFUL_CHEST, Material.CHEST, TreasureStyle.THANKFUL, RewardPool.Type.THANKFUL, true, 20000),
GINGERBREAD(C.cRed + "Gingerbread " + C.cGreen + "Treasure", "Gingerbread Chest", "Gingerbread", RewardType.GINGERBREAD_CHEST, Material.CHEST, TreasureStyle.GINGERBREAD, RewardPool.Type.GINGERBREAD, true, 20000);
GINGERBREAD(C.cRed + "Gingerbread " + C.cGreen + "Treasure", "Gingerbread Chest", "Gingerbread", RewardType.GINGERBREAD_CHEST, Material.CHEST, TreasureStyle.GINGERBREAD, RewardPool.Type.GINGERBREAD, true, 20000),
MINESTRIKE(C.cGold + "Minestrike Treasure", "Minestrike Chest", "MinestrikeChest", RewardType.MINESTRIKE_CHEST, Material.CHEST, TreasureStyle.MINESTRIKE, RewardPool.Type.MINESTRIKE, true, 20000);
private final String _name;
private final RewardType _rewardType;

View File

@ -68,6 +68,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
int trickCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.TRICK_OR_TREAT.getItemName());
int thankCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.THANKFUL.getItemName());
int gingerbreadCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.GINGERBREAD.getItemName());
int minestrikeCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.MINESTRIKE.getItemName());
List<String> shardLore = new ArrayList<>();
shardLore.add(" ");
@ -86,7 +87,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
basicLore.add(C.cGray + "many kinds of loot.");
basicLore.add(" ");
if (basicCount > 0)
basicLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
basicLore.add(C.cGreen + "Click to Open!");
else
{
basicLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "1000 Treasure Shards");
@ -103,7 +104,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
heroicLore.add(C.cGray + "temples hidden in Minecrafts worlds.");
heroicLore.add(" ");
if (heroicCount > 0)
heroicLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
heroicLore.add(C.cGreen + "Click to Open!");
else
{
heroicLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "5000 Treasure Shards");
@ -123,7 +124,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
legendaryLore.add(C.cGray + "location of these chests on their own.");
legendaryLore.add(" ");
if (legendaryCount > 0)
legendaryLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
legendaryLore.add(C.cGreen + "Click to Open!");
else
{
legendaryLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "10000 Treasure Shards");
@ -142,7 +143,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
christmasLore.add(C.cGray + "accessed in the deepest parts of Winter...");
christmasLore.add(" ");
if (christmasCount > 0)
christmasLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
christmasLore.add(C.cGreen + "Click to Open!");
else
{
christmasLore.add(C.cRed + "This item is no longer available!");
@ -162,7 +163,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
illuminatedLore.add(C.cGray + "treasure from the darkness.");
illuminatedLore.add(" ");
if (illuminatedCount > 0)
illuminatedLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
illuminatedLore.add(C.cGreen + "Click to Open!");
else
{
illuminatedLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "20000 Treasure Shards");
@ -179,7 +180,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
freedomLore.add(C.cGray + "of the apple tree he cut down...");
freedomLore.add(" ");
if (freedomCount > 0 && !hasAllFreedomItems(getPlayer()))
freedomLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
freedomLore.add(C.cGreen + "Click to Open!");
else
{
freedomLore.add(C.cRed + "This item is no longer available!");
@ -196,7 +197,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
omegaLore.add(C.cGray + "loot that has been lost...");
omegaLore.add(" ");
if (omegaCount > 0)
omegaLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
omegaLore.add(C.cGreen + "Click to Open!");
else
{
@ -212,7 +213,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
hauntedLore.add(" ");
if (hauntedCount > 0 && !hasAllHauntedItems(getPlayer()))
{
hauntedLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
hauntedLore.add(C.cGreen + "Click to Open!");
}
else
{
@ -293,6 +294,23 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
gingerbreadLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop");
}
List<String> minestrikeLore = Lists.newArrayList();
minestrikeLore.add(" ");
minestrikeLore.add(F.value("Minestrike Chests Owned", "" + minestrikeCount));
minestrikeLore.add(" ");
minestrikeLore.addAll(UtilText.splitLine(C.cGray + "Placeholder", LineFormat.LORE));
minestrikeLore.add(" ");
if (minestrikeCount > 0)
{
minestrikeLore.add(C.cGreen + "Click to Open!");
}
else
{
minestrikeLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "20000 Treasure Shards");
minestrikeLore.add(" ");
minestrikeLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop");
}
ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false);
ShopItem basic = new ShopItem(Material.CHEST, C.cGreen + C.Bold + "Old Treasure", basicLore.toArray(new String[0]), 0, false, false);
ShopItem heroic = new ShopItem(Material.TRAPPED_CHEST, C.cGold + C.Bold + "Ancient Treasure", heroicLore.toArray(new String[0]), 0, false, false);
@ -305,20 +323,22 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
ItemStack trick = new ShopItem(Material.SKULL_ITEM, C.cGoldB + "Trick or Treat Treasure", trickLore.toArray(new String[0]), 0, false, false);
ItemStack thank = new ShopItem(Material.COOKED_CHICKEN, C.cGoldB + "Thankful Treasure", thankLore.toArray(new String[0]), 0, false, false);
ItemStack gingerbread = SkinData.GINGERBREAD.getSkull(C.cRedB + "Gingerbread" + C.cGreenB + " Treasure", gingerbreadLore);
ItemStack minestrike = new ShopItem(Material.GLASS, C.cGoldB + "Minestrike Treasure", minestrikeLore.toArray(new String[0]), 0, false, false);
addItem(49, shards);
addChest(10, christmas, TreasureType.CHRISTMAS, christmasCount);
addChest(12, freedom, TreasureType.FREEDOM, freedomCount);
addChest(14, haunted, TreasureType.HAUNTED, hauntedCount);
addChest(16, omega, TreasureType.OMEGA, omegaCount);
addChest(20, trick, TreasureType.TRICK_OR_TREAT, trickCount);
addChest(22, gingerbread, TreasureType.GINGERBREAD, gingerbreadCount);
addChest(24, thank, TreasureType.THANKFUL, thankCount);
addChest(28, basic, TreasureType.OLD, basicCount);
addChest(30, heroic, TreasureType.ANCIENT, heroicCount);
addChest(32, legendary, TreasureType.MYTHICAL, legendaryCount);
addChest(34, illuminated, TreasureType.ILLUMINATED, illuminatedCount);
addChest(1, christmas, TreasureType.CHRISTMAS, christmasCount);
addChest(3, freedom, TreasureType.FREEDOM, freedomCount);
addChest(5, haunted, TreasureType.HAUNTED, hauntedCount);
addChest(7, omega, TreasureType.OMEGA, omegaCount);
addChest(19, trick, TreasureType.TRICK_OR_TREAT, trickCount);
addChest(21, gingerbread, TreasureType.GINGERBREAD, gingerbreadCount);
addChest(23, thank, TreasureType.THANKFUL, thankCount);
addChest(25, minestrike, TreasureType.MINESTRIKE, minestrikeCount);
addChest(37, basic, TreasureType.OLD, basicCount);
addChest(39, heroic, TreasureType.ANCIENT, heroicCount);
addChest(41, legendary, TreasureType.MYTHICAL, legendaryCount);
addChest(43, illuminated, TreasureType.ILLUMINATED, illuminatedCount);
}
private void addChest(int slot, ItemStack item, TreasureType treasureType, int owned)