Split 2016 and 2017 Halloween Chests

This commit is contained in:
cnr 2017-10-13 22:56:39 -07:00
parent 4680862825
commit 239bbbd96c
8 changed files with 71 additions and 11 deletions

View File

@ -52,7 +52,8 @@ public class HolidayCheerTrack extends Track
// HOLIDAY_CHESTS.add(TreasureType.FREEDOM); // HOLIDAY_CHESTS.add(TreasureType.FREEDOM);
// HOLIDAY_CHESTS.add(TreasureType.HAUNTED); // HOLIDAY_CHESTS.add(TreasureType.HAUNTED);
// HOLIDAY_CHESTS.add(TreasureType.THANKFUL); // HOLIDAY_CHESTS.add(TreasureType.THANKFUL);
HOLIDAY_CHESTS.add(TreasureType.TRICK_OR_TREAT); // HOLIDAY_CHESTS.add(TreasureType.TRICK_OR_TREAT);
HOLIDAY_CHESTS.add(TreasureType.TRICK_OR_TREAT_2017);
// HOLIDAY_CHESTS.add(TreasureType.GINGERBREAD); // HOLIDAY_CHESTS.add(TreasureType.GINGERBREAD);
// HOLIDAY_CHESTS.add(TreasureType.LOVE_CHEST); // HOLIDAY_CHESTS.add(TreasureType.LOVE_CHEST);
// HOLIDAY_CHESTS.add(TreasureType.ST_PATRICKS); // HOLIDAY_CHESTS.add(TreasureType.ST_PATRICKS);

View File

@ -26,7 +26,8 @@ public class TreasureHunterTrack extends Track
// POINTS.put(TreasureType.FREEDOM, 25); // POINTS.put(TreasureType.FREEDOM, 25);
// POINTS.put(TreasureType.HAUNTED, 25); // POINTS.put(TreasureType.HAUNTED, 25);
// POINTS.put(TreasureType.CHRISTMAS, 25); // POINTS.put(TreasureType.CHRISTMAS, 25);
POINTS.put(TreasureType.TRICK_OR_TREAT, 25); // POINTS.put(TreasureType.TRICK_OR_TREAT, 25);
POINTS.put(TreasureType.TRICK_OR_TREAT_2017, 25);
// POINTS.put(TreasureType.THANKFUL, 25); // POINTS.put(TreasureType.THANKFUL, 25);
// POINTS.put(TreasureType.GINGERBREAD, 25); // POINTS.put(TreasureType.GINGERBREAD, 25);
// POINTS.put(TreasureType.LOVE_CHEST, 25); // POINTS.put(TreasureType.LOVE_CHEST, 25);

View File

@ -30,7 +30,8 @@ import mineplex.core.treasure.types.MythicalTreasure;
import mineplex.core.treasure.types.OldTreasure; import mineplex.core.treasure.types.OldTreasure;
import mineplex.core.treasure.types.OmegaTreasure; import mineplex.core.treasure.types.OmegaTreasure;
import mineplex.core.treasure.types.Treasure; import mineplex.core.treasure.types.Treasure;
import mineplex.core.treasure.types.TrickOrTreatTreasure; import mineplex.core.treasure.types.TrickOrTreatTreasure2016;
import mineplex.core.treasure.types.TrickOrTreatTreasure2017;
@ReflectivelyCreateMiniPlugin @ReflectivelyCreateMiniPlugin
public class TreasureManager extends MiniPlugin public class TreasureManager extends MiniPlugin
@ -72,7 +73,8 @@ public class TreasureManager extends MiniPlugin
addTreasureType(new OmegaTreasure()); addTreasureType(new OmegaTreasure());
addTreasureType(new MinestrikeTreasure()); addTreasureType(new MinestrikeTreasure());
addTreasureType(new MOBATreasure()); addTreasureType(new MOBATreasure());
addTreasureType(new TrickOrTreatTreasure()); addTreasureType(new TrickOrTreatTreasure2016());
addTreasureType(new TrickOrTreatTreasure2017());
} }
private void addTreasureType(Treasure treasure) private void addTreasureType(Treasure treasure)

View File

@ -77,7 +77,7 @@ public enum TreasureType
"Each chest contains 4 exclusive items to the game!" "Each chest contains 4 exclusive items to the game!"
), ),
TRICK_OR_TREAT( TRICK_OR_TREAT(
C.cGold + "Trick or Treat Bag", C.cGold + "Trick or Treat Bag 2016",
"Trick or Treat Chest", "Trick or Treat Chest",
"TrickOrTreat", "TrickOrTreat",
new ItemStack(Material.JACK_O_LANTERN), new ItemStack(Material.JACK_O_LANTERN),
@ -85,6 +85,15 @@ public enum TreasureType
"Where the ghosts and ghouls roam", "Where the ghosts and ghouls roam",
"free! Hahahaha" "free! Hahahaha"
), ),
TRICK_OR_TREAT_2017(
C.cGold + "Trick or Treat Bag 2017",
"Trick or Treat Chest 2017",
"TrickOrTreat",
new ItemStack(Material.JACK_O_LANTERN),
"It's that time of year again!",
"Where the ghosts and ghouls roam",
"free! Hahahaha"
),
CARL_SPINNER(), CARL_SPINNER(),
GAME_LOOT(), GAME_LOOT(),
; ;

View File

@ -0,0 +1,48 @@
package mineplex.core.treasure.types;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween;
import mineplex.core.gadget.gadgets.death.DeathHalloween;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween;
import mineplex.core.gadget.gadgets.kitselector.HalloweenKitSelector;
import mineplex.core.gadget.gadgets.particle.ParticleHalloween;
import mineplex.core.gadget.gadgets.taunts.InfernalTaunt;
import mineplex.core.reward.RewardType;
import mineplex.core.treasure.animation.animations.TrickOrTreatChestAnimation;
import mineplex.core.treasure.reward.RewardRarity;
public class TrickOrTreatTreasure2016 extends Treasure
{
public TrickOrTreatTreasure2016()
{
super(TreasureType.TRICK_OR_TREAT);
setAnimation(treasureLocation -> new TrickOrTreatChestAnimation(this, treasureLocation));
setRewards(RewardType.TRICK_OR_TREAT_CHEST);
setRewardsPerChest(1);
setPurchasable(20000);
purchasableFromStore();
enabledByDefault();
}
@Override
protected void addRare(RewardRarity rarity)
{
addGadgetReward(getGadget(ArrowTrailHalloween.class), rarity, 10);
addGadgetReward(getGadget(DeathHalloween.class), rarity, 10);
addGadgetReward(getGadget(DoubleJumpHalloween.class), rarity, 10);
addGadgetReward(getGadget(HalloweenKitSelector.class), rarity, 10);
}
@Override
protected void addLegendary(RewardRarity rarity)
{
addGadgetReward(getGadget(ParticleHalloween.class), rarity, 10);
addGadgetReward(getGadget(InfernalTaunt.class), rarity, 10);
}
@Override
protected void addMythical(RewardRarity rarity)
{
}
}

View File

@ -5,7 +5,6 @@ import mineplex.core.gadget.gadgets.death.DeathHalloween;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween;
import mineplex.core.gadget.gadgets.item.ItemCandy; import mineplex.core.gadget.gadgets.item.ItemCandy;
import mineplex.core.gadget.gadgets.kitselector.HalloweenKitSelector; import mineplex.core.gadget.gadgets.kitselector.HalloweenKitSelector;
import mineplex.core.gadget.gadgets.kitselector.SingleParticleKitSelector.SingleParticleSelectors;
import mineplex.core.gadget.gadgets.morph.MorphGrimReaper; import mineplex.core.gadget.gadgets.morph.MorphGrimReaper;
import mineplex.core.gadget.gadgets.mount.types.MountNightmareSteed; import mineplex.core.gadget.gadgets.mount.types.MountNightmareSteed;
import mineplex.core.gadget.gadgets.particle.ParticleHalloween; import mineplex.core.gadget.gadgets.particle.ParticleHalloween;
@ -16,12 +15,12 @@ import mineplex.core.reward.RewardType;
import mineplex.core.treasure.animation.animations.TrickOrTreatChestAnimation; import mineplex.core.treasure.animation.animations.TrickOrTreatChestAnimation;
import mineplex.core.treasure.reward.RewardRarity; import mineplex.core.treasure.reward.RewardRarity;
public class TrickOrTreatTreasure extends Treasure public class TrickOrTreatTreasure2017 extends Treasure
{ {
public TrickOrTreatTreasure() public TrickOrTreatTreasure2017()
{ {
super(TreasureType.TRICK_OR_TREAT); super(TreasureType.TRICK_OR_TREAT_2017);
setAnimation(treasureLocation -> new TrickOrTreatChestAnimation(this, treasureLocation)); setAnimation(treasureLocation -> new TrickOrTreatChestAnimation(this, treasureLocation));
setRewards(RewardType.TRICK_OR_TREAT_CHEST); setRewards(RewardType.TRICK_OR_TREAT_CHEST);

View File

@ -289,7 +289,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
} }
} }
if (transaction.SalesPackageName.startsWith("Trick or Treat Chest")) if (transaction.SalesPackageName.startsWith("Trick or Treat Chest 2017"))
{ {
if (transaction.Coins == 0 && transaction.Gems == 0) if (transaction.Coins == 0 && transaction.Gems == 0)
{ {

View File

@ -584,7 +584,7 @@ public class HolidayManager implements Listener
.withColor(Color.AQUA).withColor(Color.BLACK).withFade(Color.AQUA) .withColor(Color.AQUA).withColor(Color.BLACK).withFade(Color.AQUA)
.withFade(Color.BLACK).flicker(true).build(); .withFade(Color.BLACK).flicker(true).build();
UtilFirework.playFirework(block.getLocation().add(0.5, 0.5, 0.5), fireworkEffect); UtilFirework.playFirework(block.getLocation().add(0.5, 0.5, 0.5), fireworkEffect);
manager.addItemToInventory(player, TreasureType.TRICK_OR_TREAT.getItemName(), 1); manager.addItemToInventory(player, TreasureType.TRICK_OR_TREAT_2017.getItemName(), 1);
UtilPlayer.message(player, F.main("Holiday Rewards", "You found a Trick or Treat Bag in a " + _type.getBlockName() + "!")); UtilPlayer.message(player, F.main("Holiday Rewards", "You found a Trick or Treat Bag in a " + _type.getBlockName() + "!"));
} }
else else