St Patricks Chest
This commit is contained in:
parent
7201e0ec0d
commit
28746c7873
@ -91,6 +91,10 @@ import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitBoots;
|
|||||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate;
|
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate;
|
||||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet;
|
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet;
|
||||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings;
|
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksBoots;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksChestplate;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksHat;
|
||||||
|
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksLeggings;
|
||||||
import mineplex.core.gadget.gadgets.particle.ParticleChristmasTree;
|
import mineplex.core.gadget.gadgets.particle.ParticleChristmasTree;
|
||||||
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
|
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
|
||||||
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
|
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
|
||||||
@ -113,6 +117,7 @@ import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot;
|
|||||||
import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood;
|
import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood;
|
||||||
import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant;
|
import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant;
|
||||||
import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt;
|
import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt;
|
||||||
|
import mineplex.core.gadget.gadgets.taunts.RainbowTaunt;
|
||||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken;
|
import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken;
|
||||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectFlames;
|
import mineplex.core.gadget.gadgets.wineffect.WinEffectFlames;
|
||||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectHalloween;
|
import mineplex.core.gadget.gadgets.wineffect.WinEffectHalloween;
|
||||||
@ -140,6 +145,7 @@ import mineplex.core.mount.types.MountMule;
|
|||||||
import mineplex.core.mount.types.MountNightmareSteed;
|
import mineplex.core.mount.types.MountNightmareSteed;
|
||||||
import mineplex.core.mount.types.MountSlime;
|
import mineplex.core.mount.types.MountSlime;
|
||||||
import mineplex.core.mount.types.MountSpider;
|
import mineplex.core.mount.types.MountSpider;
|
||||||
|
import mineplex.core.mount.types.MountStPatricksHorse;
|
||||||
import mineplex.core.mount.types.MountUndead;
|
import mineplex.core.mount.types.MountUndead;
|
||||||
import mineplex.core.mount.types.MountValentinesSheep;
|
import mineplex.core.mount.types.MountValentinesSheep;
|
||||||
import mineplex.core.mount.types.MountZombie;
|
import mineplex.core.mount.types.MountZombie;
|
||||||
@ -545,6 +551,11 @@ public class RewardManager
|
|||||||
addPetReward(Type.LOVECHEST, PetType.CUPID_PET, rarity, 50, 500);
|
addPetReward(Type.LOVECHEST, PetType.CUPID_PET, rarity, 50, 500);
|
||||||
|
|
||||||
addGadget(Type.LOVECHEST, getGadget(WinEffectLoveIsABattlefield.class), rarity, 100, 500);
|
addGadget(Type.LOVECHEST, getGadget(WinEffectLoveIsABattlefield.class), rarity, 100, 500);
|
||||||
|
|
||||||
|
// ST PATRICKS
|
||||||
|
addGadget(Type.STPATRICKS, getGadget(OutfitStPatricksChestplate.class), rarity, 50);
|
||||||
|
addGadget(Type.STPATRICKS, getGadget(OutfitStPatricksLeggings.class), rarity, 50);
|
||||||
|
addGadget(Type.STPATRICKS, getGadget(OutfitStPatricksBoots.class), rarity, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLegendary()
|
public void addLegendary()
|
||||||
@ -761,6 +772,14 @@ public class RewardManager
|
|||||||
addGadget(Type.LOVECHEST, getGadget(MorphLoveDoctor.class), rarity, 30, 5000);
|
addGadget(Type.LOVECHEST, getGadget(MorphLoveDoctor.class), rarity, 30, 5000);
|
||||||
addGadget(Type.LOVECHEST, getGadget(BlowAKissTaunt.class), rarity, 50, 5000);
|
addGadget(Type.LOVECHEST, getGadget(BlowAKissTaunt.class), rarity, 50, 5000);
|
||||||
addGadget(Type.LOVECHEST, getGadget(ParticleWingsLove.class), rarity, 10, 5000);
|
addGadget(Type.LOVECHEST, getGadget(ParticleWingsLove.class), rarity, 10, 5000);
|
||||||
|
|
||||||
|
// ST PATRICKS
|
||||||
|
addGadget(Type.STPATRICKS, getGadget(RainbowTaunt.class), rarity, 30);
|
||||||
|
addGadget(Type.STPATRICKS, getGadget(OutfitStPatricksHat.class), rarity, 15);
|
||||||
|
|
||||||
|
addPetReward(Type.STPATRICKS, PetType.LEPRECHAUN, rarity, 30);
|
||||||
|
|
||||||
|
addMount(Type.STPATRICKS, getMount(MountStPatricksHorse.class), rarity, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnknownPackageReward addMount(Type type, Mount<?> mount, RewardRarity rarity, int weight)
|
public UnknownPackageReward addMount(Type type, Mount<?> mount, RewardRarity rarity, int weight)
|
||||||
|
@ -65,6 +65,7 @@ public class RewardPool
|
|||||||
GINGERBREAD(false, 1),
|
GINGERBREAD(false, 1),
|
||||||
MINESTRIKE(true, 2),
|
MINESTRIKE(true, 2),
|
||||||
LOVECHEST(false, 1),
|
LOVECHEST(false, 1),
|
||||||
|
STPATRICKS(false, 1),
|
||||||
CARL_SPINNER(true);
|
CARL_SPINNER(true);
|
||||||
|
|
||||||
private boolean _useDuplicates;
|
private boolean _useDuplicates;
|
||||||
|
@ -21,6 +21,7 @@ public enum RewardType
|
|||||||
MINESTRIKE_CHEST( 0, 2, 16, 0),
|
MINESTRIKE_CHEST( 0, 2, 16, 0),
|
||||||
LOVE_CHEST( 0, 6, 18, 0),
|
LOVE_CHEST( 0, 6, 18, 0),
|
||||||
VALENTINES_GIFT( 0, 7, 20, 20),
|
VALENTINES_GIFT( 0, 7, 20, 20),
|
||||||
|
ST_PATRICKS( 0, 6, 18, 0),
|
||||||
|
|
||||||
SPINNER_FILLER( 0.1, 1, 4, 20),
|
SPINNER_FILLER( 0.1, 1, 4, 20),
|
||||||
SPINNER_REAL( 0.000001, 0.05, 0.4, 5);
|
SPINNER_REAL( 0.000001, 0.05, 0.4, 5);
|
||||||
|
@ -90,6 +90,13 @@ public enum TreasureStyle
|
|||||||
ParticleType.HEART,
|
ParticleType.HEART,
|
||||||
Sound.VILLAGER_YES,
|
Sound.VILLAGER_YES,
|
||||||
Sound.VILLAGER_YES
|
Sound.VILLAGER_YES
|
||||||
|
),
|
||||||
|
STPATRICKS(
|
||||||
|
ParticleType.HAPPY_VILLAGER,
|
||||||
|
ParticleType.HAPPY_VILLAGER,
|
||||||
|
ParticleType.HAPPY_VILLAGER,
|
||||||
|
Sound.VILLAGER_YES,
|
||||||
|
Sound.VILLAGER_YES
|
||||||
);
|
);
|
||||||
|
|
||||||
private ParticleType _secondaryParticle;
|
private ParticleType _secondaryParticle;
|
||||||
|
@ -32,7 +32,9 @@ public enum TreasureType
|
|||||||
|
|
||||||
MINESTRIKE(C.cGold + "Minestrike Treasure", "Minestrike Chest", "MinestrikeChest", RewardType.MINESTRIKE_CHEST, Material.CHEST, TreasureStyle.MINESTRIKE, RewardPool.Type.MINESTRIKE, true, 10000),
|
MINESTRIKE(C.cGold + "Minestrike Treasure", "Minestrike Chest", "MinestrikeChest", RewardType.MINESTRIKE_CHEST, Material.CHEST, TreasureStyle.MINESTRIKE, RewardPool.Type.MINESTRIKE, true, 10000),
|
||||||
|
|
||||||
LOVE_CHEST(C.cRed + "Love Treasure", "Love Chest", "LoveChest", RewardType.LOVE_CHEST, Material.CHEST, TreasureStyle.LOVECHEST, RewardPool.Type.LOVECHEST, true, 20000);
|
LOVE_CHEST(C.cRed + "Love Treasure", "Love Chest", "LoveChest", RewardType.LOVE_CHEST, Material.CHEST, TreasureStyle.LOVECHEST, RewardPool.Type.LOVECHEST, true, 20000),
|
||||||
|
|
||||||
|
ST_PATRICKS(C.cGreen + "St Patrick's Treasure", "St Patricks Chest", "StPatricksChest", RewardType.ST_PATRICKS, Material.CHEST, TreasureStyle.STPATRICKS,RewardPool.Type.STPATRICKS, true, 20000);
|
||||||
|
|
||||||
private final String _name;
|
private final String _name;
|
||||||
private final RewardType _rewardType;
|
private final RewardType _rewardType;
|
||||||
|
@ -49,6 +49,15 @@ public class BuyChestButton implements IButton
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_chestType == TreasureType.LOVE_CHEST)
|
||||||
|
{
|
||||||
|
if (!new File("../../update/files/EnableLoveChest.dat").exists())
|
||||||
|
{
|
||||||
|
player.sendMessage(F.main("Treasure", "That chest is no longer available for purchase!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_chestType == TreasureType.TRICK_OR_TREAT)
|
if (_chestType == TreasureType.TRICK_OR_TREAT)
|
||||||
{
|
{
|
||||||
if (!new File("../../update/files/EnableTrickOrTreat.dat").exists())
|
if (!new File("../../update/files/EnableTrickOrTreat.dat").exists())
|
||||||
|
@ -137,6 +137,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
int gingerbreadCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.GINGERBREAD.getItemName());
|
int gingerbreadCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.GINGERBREAD.getItemName());
|
||||||
int minestrikeCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.MINESTRIKE.getItemName());
|
int minestrikeCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.MINESTRIKE.getItemName());
|
||||||
int loveCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.LOVE_CHEST.getItemName());
|
int loveCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.LOVE_CHEST.getItemName());
|
||||||
|
int stpatricksCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.ST_PATRICKS.getItemName());
|
||||||
|
|
||||||
boolean availableChristmas = false;
|
boolean availableChristmas = false;
|
||||||
boolean availableFreedom = false;
|
boolean availableFreedom = false;
|
||||||
@ -144,7 +145,8 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
boolean availableTrick = false;
|
boolean availableTrick = false;
|
||||||
boolean availableThank = false;
|
boolean availableThank = false;
|
||||||
boolean availableGingerbread = false;
|
boolean availableGingerbread = false;
|
||||||
boolean availableLove = new File("../../update/files/EnableLoveChest.dat").exists();
|
boolean availableLove = false;
|
||||||
|
boolean availableStPatricks = new File("../../update/files/EnableStPatricksChest.dat").exists();
|
||||||
|
|
||||||
List<String> shardLore = new ArrayList<>();
|
List<String> shardLore = new ArrayList<>();
|
||||||
shardLore.add(" ");
|
shardLore.add(" ");
|
||||||
@ -407,6 +409,30 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> stpatricksLore = Lists.newArrayList();
|
||||||
|
stpatricksLore.add(" ");
|
||||||
|
stpatricksLore.add(F.value("Love Chests Owned", "" + loveCount));
|
||||||
|
stpatricksLore.add(" ");
|
||||||
|
stpatricksLore.addAll(UtilText.splitLines(new String[]{C.cGray + "Placeholder"}, LineFormat.LORE));
|
||||||
|
stpatricksLore.add(" ");
|
||||||
|
if (stpatricksCount > 0)
|
||||||
|
{
|
||||||
|
stpatricksLore.add(C.cGreen + "Click to Open!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!availableStPatricks)
|
||||||
|
{
|
||||||
|
stpatricksLore.add(C.cRed + "This item is no longer available");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stpatricksLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + TreasureType.LOVE_CHEST.getPurchasePrice() + " Treasure Shards");
|
||||||
|
stpatricksLore.add(" ");
|
||||||
|
stpatricksLore.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 shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false);
|
||||||
|
|
||||||
// Normal chests
|
// Normal chests
|
||||||
@ -425,6 +451,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
ItemStack thank = new ShopItem(Material.COOKED_CHICKEN, C.cGoldB + "Thankful Treasure", thankLore.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 gingerbread = SkinData.GINGERBREAD.getSkull(C.cRedB + "Gingerbread" + C.cGreenB + " Treasure", gingerbreadLore);
|
||||||
ItemStack lovechest = new ShopItem(Material.WOOL, (byte) 6, C.cRedB + "Love Chest", lovechestLore.toArray(new String[0]), 0, false, false);
|
ItemStack lovechest = new ShopItem(Material.WOOL, (byte) 6, C.cRedB + "Love Chest", lovechestLore.toArray(new String[0]), 0, false, false);
|
||||||
|
ItemStack stpatricks = SkinData.LEPRECHAUN.getSkull(C.cGreenB + "St Patrick's Treasure", stpatricksLore);
|
||||||
|
|
||||||
// Adds shard item
|
// Adds shard item
|
||||||
addItem(49, shards);
|
addItem(49, shards);
|
||||||
@ -447,6 +474,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
TreasurePageItem thankTreasureItem = new TreasurePageItem(thank, thankCount, TreasureType.THANKFUL);
|
TreasurePageItem thankTreasureItem = new TreasurePageItem(thank, thankCount, TreasureType.THANKFUL);
|
||||||
TreasurePageItem gingerbreadTreasureItem = new TreasurePageItem(gingerbread, gingerbreadCount, TreasureType.GINGERBREAD);
|
TreasurePageItem gingerbreadTreasureItem = new TreasurePageItem(gingerbread, gingerbreadCount, TreasureType.GINGERBREAD);
|
||||||
TreasurePageItem loveChestItem = new TreasurePageItem(lovechest, loveCount, TreasureType.LOVE_CHEST);
|
TreasurePageItem loveChestItem = new TreasurePageItem(lovechest, loveCount, TreasureType.LOVE_CHEST);
|
||||||
|
TreasurePageItem stPatricksItem = new TreasurePageItem(stpatricks, stpatricksCount, TreasureType.ST_PATRICKS);
|
||||||
|
|
||||||
_normalTreasures.add(oldTreasureItem);
|
_normalTreasures.add(oldTreasureItem);
|
||||||
_normalTreasures.add(ancientTreasureItem);
|
_normalTreasures.add(ancientTreasureItem);
|
||||||
@ -455,6 +483,11 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
_normalTreasures.add(omegaTreasureItem);
|
_normalTreasures.add(omegaTreasureItem);
|
||||||
_normalTreasures.add(minestrikeTreasureItem);
|
_normalTreasures.add(minestrikeTreasureItem);
|
||||||
|
|
||||||
|
if (availableStPatricks)
|
||||||
|
_specialTreasures.add(stPatricksItem);
|
||||||
|
else
|
||||||
|
_seasonalTreasures.add(stPatricksItem);
|
||||||
|
|
||||||
if (availableLove)
|
if (availableLove)
|
||||||
_specialTreasures.add(loveChestItem);
|
_specialTreasures.add(loveChestItem);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user