Balance all missions and their rewards

This commit is contained in:
Sam 2018-07-03 23:56:29 +01:00 committed by Alexander Meech
parent 44adc35305
commit 9509ae0672
8 changed files with 243 additions and 242 deletions

View File

@ -10,6 +10,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
@ -1316,7 +1317,9 @@ public class GadgetManager extends MiniPlugin
public void playLeapEffect(Player player)
{
if (UtilPlayer.isSpectator(player) || hideParticles() || player.isFlying())
GameMode gameMode = player.getGameMode();
if (gameMode == GameMode.CREATIVE || gameMode == GameMode.SPECTATOR || UtilPlayer.isSpectator(player) || player.isFlying())
{
return;
}
@ -1326,6 +1329,11 @@ public class GadgetManager extends MiniPlugin
_missionManager.incrementProgress(player, 1, MissionTrackerType.GAME_LEAP, null, null);
}
if (hideParticles())
{
return;
}
Gadget gadget = getActive(player, GadgetType.DOUBLE_JUMP);
if (gadget != null)

View File

@ -12,7 +12,7 @@ public enum MissionLength
{
DAY("Daily", "tomorrow", UtilText.splitLineToArray(C.cGray + "Here you will find missions that reset every day. Missions only reset if you've completed them or you've discarded them, click on an active mission to discard it.", LineFormat.LORE), ChatColor.WHITE, 0, 1, Calendar.DAY_OF_WEEK),
WEEK("Weekly", "next week", UtilText.splitLineToArray(C.cGray + "These missions wil rotate out every Monday. They are daily missions that have an increased objective and rewards.", LineFormat.LORE), ChatColor.GREEN, 7, 7, Calendar.WEEK_OF_YEAR),
WEEK("Weekly", "next week", UtilText.splitLineToArray(C.cGray + "These missions will rotate out every Monday. They are daily missions that have an increased objective and rewards.", LineFormat.LORE), ChatColor.GREEN, 7, 5, Calendar.WEEK_OF_YEAR),
EVENT("Event", null, UtilText.splitLineToArray(C.cGray + "These super special missions will only show up every once in a while and come with a super special reward!", LineFormat.LORE), ChatColor.LIGHT_PURPLE, 10, 1, -1);
private final String _name, _resetWhen;

View File

@ -315,13 +315,17 @@ public class MissionManager extends MiniDbClientPlugin<MissionClient>
int currentProgress = mission.getCurrentProgress() + mission.getUnsavedProgress();
int requiredProgress = mission.getRequiredProgress();
for (double requirement = 0.75; requirement > 0; requirement -= 0.25)
for (double requirement = 1; requirement > 0; requirement -= 0.25)
{
player.sendMessage("" + requirement);
if (canInform(currentProgress, amount, requiredProgress, requirement))
{
if (requirement == 1)
{
break;
}
inform(player, mission, requirement);
break;
}
}
@ -358,7 +362,15 @@ public class MissionManager extends MiniDbClientPlugin<MissionClient>
MissionClient client = Get(player);
player.sendMessage(F.main(getName(), "Clearing old missions..."));
client.getMissions().forEach(mission -> runAsync(() -> _repository.clearMission(accountId, mission.getId())));
client.getMissions().forEach(mission ->
{
if (mission.getLength() == MissionLength.EVENT)
{
return;
}
runAsync(() -> _repository.clearMission(accountId, mission.getId()));
});
client.getMissions().clear();
missions.forEach((length, contexts) ->
@ -394,6 +406,11 @@ public class MissionManager extends MiniDbClientPlugin<MissionClient>
{
Location location = npc.getEntity().getLocation().add(0, 1, 0);
if (!location.getWorld().equals(player.getWorld()))
{
return;
}
location.getWorld().playSound(location, Sound.SLIME_WALK, 1, (float) (0.5 + Math.random() / 2));
UtilParticle.PlayParticleToAll(ParticleType.SLIME, location, 1, 1, 1, 0, 8, ViewDist.NORMAL);

View File

@ -45,43 +45,43 @@ public class MissionPopulator
.description("Complete any Parkour")
.tracker(LOBBY_PARKOUR)
.rewards(
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
new LevelExperienceReward(300),
new LevelCurrencyReward(GlobalCurrency.GEM, 150),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 150)
)
.build();
MissionContext.newBuilder(manager, 1)
.name("Gadget Crazy")
.description("Use %s gadgets")
.xRange(25, 50)
.xRange(30, 40)
.tracker(LOBBY_GADGET_USE)
.rewards(
new LevelExperienceReward(3),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(5),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
)
.build();
MissionContext.newBuilder(manager, 2)
.name("Not In The Face!")
.description("Flesh Hook %s players")
.xRange(25, 50)
.xRange(15, 25)
.tracker(LOBBY_FLESH_HOOK)
.rewards(
new LevelExperienceReward(5),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
)
.build();
MissionContext.newBuilder(manager, 3)
.name("Jumper")
.description("Use a jump pad %s times")
.xRange(10, 50)
.xRange(25, 40)
.tracker(LOBBY_JUMP_PAD)
.rewards(
new LevelExperienceReward(5),
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
)
@ -90,12 +90,12 @@ public class MissionPopulator
MissionContext.newBuilder(manager, 4)
.name("Mini Mini Games")
.description("Play %s Lobby Games")
.xRange(2, 4)
.xRange(3, 6)
.tracker(LOBBY_GAMES_PLAYED)
.rewards(
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
)
.build();
@ -116,7 +116,7 @@ public class MissionPopulator
.description("Take no damage in GLD")
.tracker(LOBBY_GLD_NO_DAMAGE)
.rewards(
new LevelExperienceReward(1000),
new LevelExperienceReward(600),
new LevelCurrencyReward(GlobalCurrency.GEM, 300),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 300)
)
@ -128,21 +128,8 @@ public class MissionPopulator
.name("Enthusiast")
.description("Play %s games")
.games(GameDisplay.values())
.xRange(10, 50)
.xRange(10, 15)
.tracker(GAME_PLAY)
.rewards(
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
)
.build();
MissionContext.newBuilder(manager, 101)
.name("Winner")
.description("Win %s games")
.games(GameDisplay.values())
.xRange(2, 10)
.tracker(GAME_WIN)
.rewards(
new LevelExperienceReward(40),
new LevelCurrencyReward(GlobalCurrency.GEM, 20),
@ -150,16 +137,29 @@ public class MissionPopulator
)
.build();
MissionContext.newBuilder(manager, 101)
.name("Winner")
.description("Win %s games")
.games(GameDisplay.values())
.xRange(3, 7)
.tracker(GAME_WIN)
.rewards(
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
)
.build();
MissionContext.newBuilder(manager, 102)
.name("Killer")
.description("Kill %s players in game")
.games(GameDisplay.values())
.xRange(10, 50)
.xRange(15, 25)
.tracker(GAME_KILL)
.rewards(
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
new LevelExperienceReward(14),
new LevelCurrencyReward(GlobalCurrency.GEM, 7),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 7)
)
.build();
@ -167,10 +167,10 @@ public class MissionPopulator
.name("I Shall Taunt You A Second Time")
.description("Taunt %s times in game")
.games(GameDisplay.values())
.xRange(2, 20)
.xRange(5, 15)
.tracker(GAME_TAUNT)
.rewards(
new LevelExperienceReward(30),
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
)
@ -180,12 +180,12 @@ public class MissionPopulator
.name("Leap Higher!")
.description("Leap or Double Jump %s times in game")
.games(GameDisplay.values())
.xRange(20, 40)
.xRange(20, 35)
.tracker(GAME_LEAP)
.rewards(
new LevelExperienceReward(6),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
)
.build();
@ -198,9 +198,9 @@ public class MissionPopulator
.xRange(3, 6)
.tracker(GAME_KILL_MIDAIR)
.rewards(
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
new LevelExperienceReward(80),
new LevelCurrencyReward(GlobalCurrency.GEM, 40),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 40)
)
.build();
@ -208,12 +208,12 @@ public class MissionPopulator
.name("Sneaky")
.description("Be on the enemy turf for %s seconds")
.games(TurfWars)
.xRange(60, 120)
.xRange(60, 90)
.tracker(TURF_WARS_ON_ENEMY)
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(2),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
)
.build();
@ -221,12 +221,12 @@ public class MissionPopulator
.name("Better than explosions")
.description("Break %s wool with your bow")
.games(TurfWars)
.xRange(5, 40)
.xRange(50, 60)
.tracker(TURF_WARS_BOW_BREAK)
.rewards(
new LevelExperienceReward(25),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
)
.build();
@ -237,7 +237,7 @@ public class MissionPopulator
.description("Guess %s words in under %s seconds")
.games(Draw)
.xRange(2, 5)
.yRange(10, 20)
.yRange(20, 25)
.tracker(DMT_GUESS)
.rewards(
new LevelExperienceReward(200),
@ -252,9 +252,9 @@ public class MissionPopulator
.games(Draw)
.tracker(DMT_GUESS_ALL)
.rewards(
new LevelExperienceReward(1250),
new LevelCurrencyReward(GlobalCurrency.GEM, 750),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 750)
new LevelExperienceReward(1200),
new LevelCurrencyReward(GlobalCurrency.GEM, 600),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 600)
)
.build();
@ -264,13 +264,13 @@ public class MissionPopulator
.name("Tickle Master")
.description("Kill %s players with a feather")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 5)
.xRange(1, 3)
.tracker(GAME_KILL)
.trackerData("Feather")
.rewards(
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
new LevelExperienceReward(300),
new LevelCurrencyReward(GlobalCurrency.GEM, 150),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 150)
)
.build();
@ -278,7 +278,7 @@ public class MissionPopulator
.name("Bojack Takedown")
.description("Kill %s players while riding a horse")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 5)
.xRange(1, 3)
.tracker(SG_BOW_HORSE_KILL)
.rewards(
new LevelExperienceReward(400),
@ -291,12 +291,12 @@ public class MissionPopulator
.name("Not Enough Supply")
.description("Loot %s supply drops")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(2, 15)
.xRange(3, 9)
.tracker(SG_SUPPLY_DROP_OPEN)
.rewards(
new LevelExperienceReward(150),
new LevelCurrencyReward(GlobalCurrency.GEM, 75),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 75)
new LevelExperienceReward(120),
new LevelCurrencyReward(GlobalCurrency.GEM, 60),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 60)
)
.build();
@ -304,7 +304,7 @@ public class MissionPopulator
.name("Diamond Weaponsmith")
.description("Craft %s diamond swords")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 10)
.xRange(1, 3)
.tracker(GAME_CRAFT_ITEM)
.trackerData(Material.DIAMOND_SWORD)
.rewards(
@ -318,13 +318,13 @@ public class MissionPopulator
.name("Gold Weaponsmith")
.description("Craft %s gold swords")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 10)
.xRange(1, 3)
.tracker(GAME_CRAFT_ITEM)
.trackerData(Material.GOLD_SWORD)
.rewards(
new LevelExperienceReward(250),
new LevelCurrencyReward(GlobalCurrency.GEM, 125),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 125)
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
)
.build();
@ -332,7 +332,7 @@ public class MissionPopulator
.name("Iron Weaponsmith")
.description("Craft %s iron swords")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 10)
.xRange(1, 3)
.tracker(GAME_CRAFT_ITEM)
.trackerData(Material.IRON_SWORD)
.rewards(
@ -346,13 +346,13 @@ public class MissionPopulator
.name("Why Thou")
.description("Craft %s gold shovels")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 10)
.xRange(1, 3)
.tracker(GAME_CRAFT_ITEM)
.trackerData(Material.GOLD_SPADE)
.rewards(
new LevelExperienceReward(250),
new LevelCurrencyReward(GlobalCurrency.GEM, 125),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 125)
new LevelExperienceReward(150),
new LevelCurrencyReward(GlobalCurrency.GEM, 75),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 75)
)
.build();
@ -360,7 +360,7 @@ public class MissionPopulator
.name("Looter")
.description("Loot %s chests")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(25, 100)
.xRange(40, 60)
.tracker(GAME_CHEST_OPEN)
.rewards(
new LevelExperienceReward(4),
@ -373,13 +373,13 @@ public class MissionPopulator
.name("Steve Walker")
.description("Walk %s blocks")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1000, 5000)
.xRange(2000, 4000)
.tracker(GAME_WALK)
.scaleDownRewards()
.rewards(
new LevelExperienceReward(1),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
)
.build();
@ -387,12 +387,12 @@ public class MissionPopulator
.name("It Sparkles Now!")
.description("Enchant %s items")
.games(SurvivalGames, SurvivalGamesTeams)
.xRange(1, 25)
.xRange(2, 5)
.tracker(GAME_ENCHANT_ITEM)
.rewards(
new LevelExperienceReward(40),
new LevelCurrencyReward(GlobalCurrency.GEM, 20),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 20)
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
)
.build();
@ -402,7 +402,7 @@ public class MissionPopulator
.name("Block Ninja")
.description("Infest %s blocks")
.games(HideSeek)
.xRange(10, 30)
.xRange(10, 15)
.tracker(BLOCK_HUNT_INFEST)
.rewards(
new LevelExperienceReward(20),
@ -415,7 +415,7 @@ public class MissionPopulator
.name("Glitter In The Sky")
.description("Set off %s fireworks")
.games(HideSeek)
.xRange(5, 50)
.xRange(6, 12)
.tracker(BLOCK_HUNT_FIREWORK)
.rewards(
new LevelExperienceReward(20),
@ -428,7 +428,7 @@ public class MissionPopulator
.name("Neko Neko Nee")
.description("Meow %s times")
.games(HideSeek)
.xRange(10, 100)
.xRange(20, 40)
.tracker(BLOCK_HUNT_MEOW)
.rewards(
new LevelExperienceReward(10),
@ -441,13 +441,13 @@ public class MissionPopulator
.name("Hunters Get Hunted")
.description("Kill %s hunters with the Hyper Axe")
.games(HideSeek)
.xRange(1, 10)
.xRange(1, 3)
.tracker(GAME_KILL)
.trackerData("Hyper Axe")
.rewards(
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
new LevelExperienceReward(250),
new LevelCurrencyReward(GlobalCurrency.GEM, 125),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 125)
)
.build();
@ -455,7 +455,7 @@ public class MissionPopulator
.name("Legitimate Strategy")
.description("Stand perfectly still for %s seconds as a hider")
.games(HideSeek)
.xRange(60, 600)
.xRange(240, 360)
.tracker(GAME_STAND_STILL)
.trackerData(ChatColor.AQUA)
.rewards(
@ -469,14 +469,14 @@ public class MissionPopulator
.name("Who Needs To Hide?")
.description("Run %s blocks as a hider")
.games(HideSeek)
.xRange(500, 1000)
.xRange(500, 600)
.tracker(GAME_WALK)
.trackerData(ChatColor.AQUA)
.scaleDownRewards()
.rewards(
new LevelExperienceReward(2),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
)
.build();
@ -484,13 +484,13 @@ public class MissionPopulator
.name("Poke!")
.description("Shoot %s hunters as a hider")
.games(HideSeek)
.xRange(5, 25)
.xRange(10, 20)
.tracker(GAME_DAMAGE_CAUSE)
.trackerData(DamageCause.PROJECTILE)
.rewards(
new LevelExperienceReward(40),
new LevelCurrencyReward(GlobalCurrency.GEM, 20),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 20)
new LevelExperienceReward(6),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
)
.build();
@ -500,7 +500,7 @@ public class MissionPopulator
.name("Golden Warrior")
.description("Kill %s players with The Golden Pickaxe")
.games(CakeWars4, CakeWarsDuos)
.xRange(1, 10)
.xRange(2, 4)
.tracker(GAME_KILL)
.trackerData("The Golden Pickaxe")
.rewards(
@ -514,7 +514,7 @@ public class MissionPopulator
.name("Does This Have Rocks In It?")
.description("Kill %s players by throwing a Snowball")
.games(CakeWars4, CakeWarsDuos)
.xRange(1, 10)
.xRange(2, 4)
.tracker(GAME_KILL)
.trackerData("Frosting")
.rewards(
@ -528,7 +528,7 @@ public class MissionPopulator
.name("The New JoJo")
.description("Kill %s players with your Fists")
.games(CakeWars4, CakeWarsDuos)
.xRange(1, 10)
.xRange(2, 4)
.tracker(GAME_KILL)
.trackerData("Fists")
.rewards(
@ -542,12 +542,12 @@ public class MissionPopulator
.name("The Cake Wars Diet")
.description("Eat %s cake slices")
.games(CakeWars4, CakeWarsDuos)
.xRange(5, 50)
.xRange(12, 18)
.tracker(CW_EAT_SLICE)
.rewards(
new LevelExperienceReward(80),
new LevelCurrencyReward(GlobalCurrency.GEM, 40),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 40)
new LevelExperienceReward(30),
new LevelCurrencyReward(GlobalCurrency.GEM, 15),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 15)
)
.build();
@ -555,13 +555,13 @@ public class MissionPopulator
.name("This Is All Mine")
.description("Place %s wool blocks.")
.games(CakeWars4, CakeWarsDuos)
.xRange(50, 200)
.xRange(100, 150)
.tracker(GAME_BLOCK_PLACE)
.trackerData(Material.WOOL)
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(2),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
)
.build();
@ -569,7 +569,7 @@ public class MissionPopulator
.name("Domination")
.description("Capture %s points.")
.games(CakeWars4, CakeWarsDuos)
.xRange(3, 15)
.xRange(5, 8)
.tracker(GAME_CAPTURE_POINT)
.rewards(
new LevelExperienceReward(60),
@ -582,12 +582,12 @@ public class MissionPopulator
.name("It's like Christmas but with Cake")
.description("Loot %s cake island chests.")
.games(CakeWars4, CakeWarsDuos)
.xRange(3, 15)
.xRange(4, 8)
.tracker(GAME_CHEST_OPEN)
.rewards(
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
new LevelExperienceReward(60),
new LevelCurrencyReward(GlobalCurrency.GEM, 30),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 30)
)
.build();
@ -595,12 +595,12 @@ public class MissionPopulator
.name("Brick Entrepreneur")
.description("Spend %s bricks")
.games(CakeWars4, CakeWarsDuos)
.xRange(32, 256)
.xRange(100, 200)
.tracker(CW_SPEND_RESOURCE)
.trackerData(ChatColor.RED)
.scaleDownRewards()
.rewards(
new LevelExperienceReward(2),
new LevelExperienceReward(50),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
)
@ -610,13 +610,13 @@ public class MissionPopulator
.name("Emerald Entrepreneur")
.description("Spend %s emeralds")
.games(CakeWars4, CakeWarsDuos)
.xRange(16, 128)
.xRange(30, 60)
.tracker(CW_SPEND_RESOURCE)
.trackerData(ChatColor.GREEN)
.rewards(
new LevelExperienceReward(2),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
)
.build();
@ -624,13 +624,13 @@ public class MissionPopulator
.name("Nether Star Entrepreneur")
.description("Spend %s nether stars")
.games(CakeWars4, CakeWarsDuos)
.xRange(4, 64)
.xRange(6, 12)
.tracker(CW_SPEND_RESOURCE)
.trackerData(ChatColor.GOLD)
.rewards(
new LevelExperienceReward(6),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
)
.build();
@ -640,12 +640,12 @@ public class MissionPopulator
.name("Plus Ultra!")
.description("Use a Smash Crystal %s times")
.games(Smash, SmashTeams)
.xRange(2, 8)
.xRange(2, 5)
.tracker(SSM_SMASH)
.rewards(
new LevelExperienceReward(50),
new LevelCurrencyReward(GlobalCurrency.GEM, 25),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 25)
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
)
.build();
@ -653,7 +653,7 @@ public class MissionPopulator
.name("Who's Next?")
.description("Win %s games without dying")
.games(Smash, SmashTeams)
.xRange(1, 4)
.xRange(1, 2)
.tracker(GAME_WIN_WITHOUT_DYING)
.rewards(
new LevelExperienceReward(500),
@ -670,9 +670,9 @@ public class MissionPopulator
.tracker(GAME_KILL)
.trackerData("Chicken Missile")
.rewards(
new LevelExperienceReward(500),
new LevelCurrencyReward(GlobalCurrency.GEM, 250),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 250)
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
)
.build();
@ -680,7 +680,7 @@ public class MissionPopulator
.name("Balancing Trick")
.description("Be airborne for %s seconds")
.games(Smash, SmashTeams)
.xRange(60, 180)
.xRange(60, 120)
.tracker(SSM_AIRBORNE)
.rewards(
new LevelExperienceReward(4),
@ -695,7 +695,7 @@ public class MissionPopulator
.name("Brock Breaks Blocks")
.description("Break %s blocks")
.games(Micro)
.xRange(25, 100)
.xRange(30, 60)
.tracker(GAME_BLOCK_BREAK)
.rewards(
new LevelExperienceReward(6),
@ -708,7 +708,7 @@ public class MissionPopulator
.name("New Ground")
.description("Place %s blocks")
.games(Micro)
.xRange(25, 100)
.xRange(30, 60)
.tracker(GAME_BLOCK_PLACE)
.rewards(
new LevelExperienceReward(6),
@ -736,12 +736,12 @@ public class MissionPopulator
.name("You can't hide whats inside!")
.description("Kill the last player on a team %s times")
.games(Bridge)
.xRange(2, 5)
.xRange(1, 3)
.tracker(BRIDGES_KILL_LAST)
.rewards(
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
new LevelExperienceReward(150),
new LevelCurrencyReward(GlobalCurrency.GEM, 75),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 75)
)
.build();
@ -766,9 +766,9 @@ public class MissionPopulator
.xRange(50, 100)
.tracker(GAME_BLOCK_BREAK)
.rewards(
new LevelExperienceReward(2),
new LevelCurrencyReward(GlobalCurrency.GEM, 1),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 1)
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
)
.build();
@ -776,12 +776,12 @@ public class MissionPopulator
.name("Smelter")
.description("Smelt or Cook %s items")
.games(Bridge)
.xRange(10, 50)
.xRange(25, 35)
.tracker(GAME_FURNACE_SMELT)
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(6),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
)
.build();
@ -789,26 +789,13 @@ public class MissionPopulator
.name("Going On The Offensive")
.description("Craft %s Diamond Swords")
.games(Bridge)
.xRange(1, 5)
.xRange(1, 3)
.tracker(GAME_CRAFT_ITEM)
.trackerData(Material.DIAMOND_SWORD)
.rewards(
new LevelExperienceReward(50),
new LevelCurrencyReward(GlobalCurrency.GEM, 25),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 25)
)
.build();
MissionContext.newBuilder(manager, 905)
.name("Advantage")
.description("Enchant %s items")
.games(Bridge)
.xRange(2, 10)
.tracker(GAME_ENCHANT_ITEM)
.rewards(
new LevelExperienceReward(30),
new LevelCurrencyReward(GlobalCurrency.GEM, 15),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 15)
new LevelExperienceReward(100),
new LevelCurrencyReward(GlobalCurrency.GEM, 50),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 50)
)
.build();
@ -818,12 +805,12 @@ public class MissionPopulator
.name("Classicwars")
.description("Win %s games without using any kit abilities")
.games(Skywars, SkywarsTeams)
.xRange(1, 4)
.xRange(1, 3)
.tracker(SW_NO_ABILITIES)
.rewards(
new LevelExperienceReward(250),
new LevelCurrencyReward(GlobalCurrency.GEM, 125),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 125)
new LevelExperienceReward(200),
new LevelCurrencyReward(GlobalCurrency.GEM, 100),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 100)
)
.build();
@ -831,13 +818,13 @@ public class MissionPopulator
.name("Spawner")
.description("Loot %s spawn island chests")
.games(Skywars, SkywarsTeams)
.xRange(4, 64)
.xRange(20, 30)
.tracker(GAME_CHEST_OPEN)
.trackerData("Island")
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
)
.build();
@ -845,13 +832,13 @@ public class MissionPopulator
.name("Connector")
.description("Loot %s connector island chests")
.games(Skywars, SkywarsTeams)
.xRange(4, 64)
.xRange(20, 30)
.tracker(GAME_CHEST_OPEN)
.trackerData("Connector")
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
)
.build();
@ -859,13 +846,13 @@ public class MissionPopulator
.name("Midder")
.description("Loot %s middle island chests")
.games(Skywars, SkywarsTeams)
.xRange(4, 64)
.xRange(20, 30)
.tracker(GAME_CHEST_OPEN)
.trackerData("Middle")
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
)
.build();
@ -873,12 +860,12 @@ public class MissionPopulator
.name("EXPLOSION")
.description("Pickup %s Throwable TNT")
.games(Skywars, SkywarsTeams)
.xRange(1, 10)
.xRange(8, 16)
.tracker(GAME_GENERATOR_COLLECT)
.rewards(
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(12),
new LevelCurrencyReward(GlobalCurrency.GEM, 6),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 6)
)
.build();
@ -886,12 +873,12 @@ public class MissionPopulator
.name("Megimin Approved")
.description("Throw %s Throwable TNT")
.games(Skywars, SkywarsTeams)
.xRange(1, 10)
.xRange(8, 16)
.tracker(GAME_THROW_TNT)
.rewards(
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(12),
new LevelCurrencyReward(GlobalCurrency.GEM, 6),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 6)
)
.build();
@ -899,12 +886,12 @@ public class MissionPopulator
.name("Destructor")
.description("Break %s blocks")
.games(Skywars, SkywarsTeams)
.xRange(16, 128)
.xRange(30, 60)
.tracker(GAME_BLOCK_BREAK)
.rewards(
new LevelExperienceReward(4),
new LevelCurrencyReward(GlobalCurrency.GEM, 2),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 2)
new LevelExperienceReward(6),
new LevelCurrencyReward(GlobalCurrency.GEM, 3),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 3)
)
.build();
@ -912,12 +899,12 @@ public class MissionPopulator
.name("Skilled In The Craft")
.description("Craft %s items")
.games(Skywars, SkywarsTeams)
.xRange(2, 8)
.xRange(8, 16)
.tracker(GAME_CRAFT_ITEM)
.rewards(
new LevelExperienceReward(8),
new LevelCurrencyReward(GlobalCurrency.GEM, 4),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 4)
new LevelExperienceReward(12),
new LevelCurrencyReward(GlobalCurrency.GEM, 6),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 6)
)
.build();
@ -925,25 +912,12 @@ public class MissionPopulator
.name("Ella Was Enchanted")
.description("Enchant %s items")
.games(Skywars, SkywarsTeams)
.xRange(2, 8)
.xRange(6, 12)
.tracker(GAME_ENCHANT_ITEM)
.rewards(
new LevelExperienceReward(8),
new LevelCurrencyReward(GlobalCurrency.GEM, 4),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 4)
)
.build();
MissionContext.newBuilder(manager, 1009)
.name("Who Needs A Hammer?")
.description("Smelt %s items in a furnace")
.games(Skywars, SkywarsTeams)
.xRange(2, 8)
.tracker(GAME_FURNACE_SMELT)
.rewards(
new LevelExperienceReward(8),
new LevelCurrencyReward(GlobalCurrency.GEM, 4),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 4)
new LevelExperienceReward(16),
new LevelCurrencyReward(GlobalCurrency.GEM, 8),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 8)
)
.build();
@ -953,7 +927,7 @@ public class MissionPopulator
.name("A Real Champion")
.description("Earn %s points")
.games(ChampionsDominate)
.xRange(10000, 100000)
.xRange(15000, 30000)
.tracker(DOM_POINT)
.scaleDownRewards()
.rewards(
@ -980,7 +954,7 @@ public class MissionPopulator
.name("Playing Objective")
.description("Capture %s objectives")
.games(ChampionsDominate)
.xRange(4, 16)
.xRange(10, 15)
.tracker(GAME_CAPTURE_POINT)
.rewards(
new LevelExperienceReward(20),
@ -995,7 +969,7 @@ public class MissionPopulator
.name("Rally To Me!")
.description("Take %s flags")
.games(ChampionsCTF)
.xRange(2, 10)
.xRange(10, 15)
.tracker(CTF_TAKE)
.rewards(
new LevelExperienceReward(20),
@ -1008,12 +982,12 @@ public class MissionPopulator
.name("Cap'ed!")
.description("Capture %s flags")
.games(ChampionsCTF)
.xRange(2, 10)
.xRange(4, 8)
.tracker(CTF_CAPTURE)
.rewards(
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(40),
new LevelCurrencyReward(GlobalCurrency.GEM, 20),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 20)
)
.build();
@ -1023,13 +997,13 @@ public class MissionPopulator
.name("Block Spammer")
.description("Place %s blocks")
.games(Build)
.xRange(100, 1000)
.xRange(250, 500)
.tracker(GAME_BLOCK_PLACE)
.scaleDownRewards()
.rewards(
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(50),
new LevelCurrencyReward(GlobalCurrency.GEM, 25),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 25)
)
.build();
@ -1037,12 +1011,12 @@ public class MissionPopulator
.name("Da Bomb")
.description("Rate %s other builds")
.games(Build)
.xRange(4, 20)
.xRange(20, 30)
.tracker(BUILD_RATE)
.rewards(
new LevelExperienceReward(20),
new LevelCurrencyReward(GlobalCurrency.GEM, 10),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 10)
new LevelExperienceReward(12),
new LevelCurrencyReward(GlobalCurrency.GEM, 6),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 6)
)
.build();
@ -1050,12 +1024,12 @@ public class MissionPopulator
.name("Mostly Sparkles")
.description("Place %s particles")
.games(Build)
.xRange(8, 50)
.xRange(30, 40)
.tracker(BUILD_PARTICLES)
.rewards(
new LevelExperienceReward(10),
new LevelCurrencyReward(GlobalCurrency.GEM, 5),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 5)
new LevelExperienceReward(8),
new LevelCurrencyReward(GlobalCurrency.GEM, 4),
new LevelCurrencyReward(GlobalCurrency.TREASURE_SHARD, 4)
)
.build();
}

View File

@ -152,7 +152,7 @@ public class MissionMainPage extends ShopPageBase<MissionManager, MissionShop>
{
builder.setGlow(true);
builder.setTitle(C.cGreenB + mission.getName());
builder.addLore("", C.cGreen + "This mission is active." + (eventMission ? "" : "Click to discard."));
builder.addLore("", C.cGreen + "This mission is active." + (eventMission ? "" : " Click to discard."));
}
if (lastLength == null || lastLength != mission.getLength())

View File

@ -456,7 +456,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed
new BlocksMissionTracker(this),
new FurnaceMissionTracker(this)
);
manager.getMissionsManager().setCanIncrement(() -> CanAddStats && GetState() != GameState.Recruit && manager.IsRewardStats());
manager.getMissionsManager().setCanIncrement(() -> CanAddStats && InProgress() && manager.IsRewardStats());
Manager.getResourcePackManager().setResourcePack(gameType.getResourcePackUrls(this), gameType.isEnforceResourcePack(this));

View File

@ -586,6 +586,7 @@ public abstract class SurvivalGamesNew extends Game
.addItem(new ItemStack(Material.FEATHER), 1, 2, 70)
.addItem(new ItemStack(Material.GOLD_INGOT), 1, 1, 80)
.addItem(compassModule.getCompass(5))
.addItem(new ItemStack(Material.IRON_INGOT), 50)
.addItem(new ItemStack(Material.DIAMOND), 50)
.addItem(tnt, 50)

View File

@ -14,6 +14,7 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.account.permissions.Permission;
import mineplex.core.account.permissions.PermissionGroup;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.game.GameDisplay;
@ -97,7 +98,7 @@ public class VotingManager extends ListenerComponent implements Lifetimed
for (Player player : UtilServer.getPlayersCollection())
{
player.getInventory().remove(remove);
player.closeInventory();
UtilPlayer.closeInventoryIfOpen(player);
}
// false when /game set has been used during a vote