Valentines rewards

This commit is contained in:
Shaun Bennett 2016-02-12 04:54:09 -06:00
parent 66aa89b5e0
commit 1e596a6969
3 changed files with 84 additions and 15 deletions

View File

@ -100,7 +100,55 @@ public class RewardManager
}
// Valentines
addReward(RewardPool.Type.VALENTINES_GIFT, new TreasureShardReward(_clientManager, donationManager, 50, 100, 10, rarity));
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Cupid's Arrows", "Cupid Arrow", 1, 5,
new ItemStack(Material.BOW, 1), rarity, 300, 0));
// Pets
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Cow Pet", "Cow",
EntityType.COW, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Sheep Pet", "Sheep",
EntityType.SHEEP, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Mooshroom Pet", "Mooshroom",
EntityType.MUSHROOM_COW, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Pig Pet", "Pig",
EntityType.PIG, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Ocelot Pet", "Cat",
EntityType.OCELOT, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Chicken Pet", "Chicken",
EntityType.CHICKEN, rarity, 50, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new PetReward(petManager, inventoryManager, donationManager, "Wolf Pet", "Dog",
EntityType.WOLF, rarity, 50, _uncommonShards));
// Discs
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "13 Disc", "13 Disc",
new ItemStack(2256), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Cat Disc", "Cat Disc",
new ItemStack(2257), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Blocks Disc", "Blocks Disc",
new ItemStack(2258), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Chirp Disc", "Chirp Disc",
new ItemStack(2259), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Far Disc", "Far Disc",
new ItemStack(2260), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Mall Disc", "Mall Disc",
new ItemStack(2261), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Mellohi Disc", "Mellohi Disc",
new ItemStack(2262), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Stal Disc", "Stal Disc",
new ItemStack(2263), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Strad Disc", "Strad Disc",
new ItemStack(2264), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Ward Disc", "Ward Disc",
new ItemStack(2265), rarity, 10, _uncommonShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Music Disc", "Wait Disc", "Wait Disc",
new ItemStack(2267), rarity, 10, _uncommonShards));
// Mounts
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Mount", "Mule", "Mount Mule",
new ItemStack(Material.HAY_BLOCK), rarity, 4, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Mount", "Minecart", "Minecart",
new ItemStack(Material.MINECART), rarity, 3, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Mount", "Slime", "Slime Mount",
new ItemStack(Material.SLIME_BALL), rarity, 2, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Mount", "Glacial Steed", "Glacial Steed",
new ItemStack(Material.SNOW_BALL), rarity, 1, _rareShards));
// Christmas
addReward(RewardPool.Type.WINTER_HOLIDAY, new InventoryReward(inventoryManager, "Coal", "Coal", 50, 100,
@ -165,10 +213,8 @@ public class RewardManager
}
// Valentines
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Love Potion", "Love Potion", 1, 2,
new ItemStack(Material.POTION, 1), rarity, 10, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Cupid's Arrows", "Cupid Arrow", 1, 10,
new ItemStack(Material.BOW, 1), rarity, 10, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Love Potion", "Love Potion", 1, 1,
new ItemStack(Material.POTION, 1), rarity, 100, 0));
// Christmas
addReward(RewardPool.Type.WINTER_HOLIDAY, new InventoryReward(inventoryManager, "Freeze Cannon", "Freeze Cannon", 5, 10,
@ -267,7 +313,16 @@ public class RewardManager
}
// Valentines
addReward(RewardPool.Type.VALENTINES_GIFT, new TreasureShardReward(_clientManager, donationManager, 100, 300, 10, rarity));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Hat", "Companion Hat", "Companion",
SkinData.COMPANION_CUBE.getSkull(), rarity, 100, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Hat", "Lovestruck Hat", "Lovestruck",
SkinData.LOVESTRUCK.getSkull(), rarity, 100, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Hat", "Secret Package Hat", "Secret Package",
SkinData.SECRET_PACKAGE.getSkull(), rarity, 100, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Hat", "Teddy Bear Hat", "Teddy Bear",
SkinData.TEDDY_BEAR.getSkull(), rarity, 100, 0));
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Love Potion", "Love Potion", 1, 1,
new ItemStack(Material.POTION, 1), rarity, 1, 0));
// Christmas
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "Santa", "Santa",
@ -341,13 +396,15 @@ public class RewardManager
// Valentines
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Arrow Effect", "Arrows of Cupid", "Arrows of Cupid",
new ItemStack(Material.POTION), rarity, 10, _rareShards));
new ItemStack(Material.POTION), rarity, 100, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Death Effect", "Broken Hearted", "Broken Hearted",
new ItemStack(Material.POTION), rarity, 10, _rareShards));
new ItemStack(Material.POTION), rarity, 100, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Jump Effect", "Wings of Love", "Wings of Love",
new ItemStack(Material.POTION), rarity, 10, _rareShards));
new ItemStack(Material.POTION), rarity, 100, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new UnknownPackageReward(donationManager, "Particles", "Heartfelt Halo", "Heartfelt Halo",
new ItemStack(Material.POTION), rarity, 10, _rareShards));
new ItemStack(Material.POTION), rarity, 100, _rareShards));
addReward(RewardPool.Type.VALENTINES_GIFT, new InventoryReward(inventoryManager, "Love Potion", "Love Potion", 1, 1,
new ItemStack(Material.POTION, 1), rarity, 1, 0));
// Christmas
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "The Grinch", "The Grinch",
@ -504,7 +561,7 @@ public class RewardManager
}
}
if (!isExcluded)
if (!isExcluded && (pool.getUseDuplicates() || treasure.canGiveReward(player)))
{
possibleRewards.add(treasure);
totalWeight += treasure.getWeight();

View File

@ -34,8 +34,20 @@ public class RewardPool
public static enum Type
{
NORMAL,
WINTER_HOLIDAY,
VALENTINES_GIFT;
NORMAL(true),
WINTER_HOLIDAY(true),
VALENTINES_GIFT(false);
private boolean _useDuplicates;
Type(boolean useDuplicates)
{
_useDuplicates = useDuplicates;
}
public boolean getUseDuplicates()
{
return _useDuplicates;
}
}
}

View File

@ -11,7 +11,7 @@ public enum RewardType
AncientChest( 0, 2, 8, 32),
MythicalChest( 0.1, 4, 16, 72),
WinterChest( 0, 5, 18, 32),
ValentinesGift( 9, 10, 25, 40),
ValentinesGift( 0, 7, 20, 20),
SpinnerFiller( 0.1, 1, 4, 20),
SpinnerReal( 0.000001, 0.05, 0.4, 5);