Make achievement kits have requirements

This commit is contained in:
Sam 2017-08-04 16:19:06 +01:00
parent eadfc55ae3
commit e57ab4bf3d
3 changed files with 20 additions and 13 deletions

View File

@ -24,6 +24,8 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.achievement.Achievement;
import mineplex.core.achievement.AchievementCategory;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
@ -86,6 +88,11 @@ public class CastleSiegeNew extends TeamGame
"Wolves must wait 6 seconds in between respawns.",
"Coordination and teamwork are important to winning as Defenders."
};
private static final Achievement[] ACHIEVEMENTS = Achievement.getByCategory(AchievementCategory.CASTLE_SIEGE).toArray(new Achievement[0]);
public static Achievement[] getGameAchievements()
{
return ACHIEVEMENTS;
}
private static final int START_TIME = 14000;
private static final int UNDEAD_BURN_TIME = 24000;
private static final int DEFENDER_WIN_TIME = UNDEAD_BURN_TIME + 200;

View File

@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.castlesiegenew.kits;
import mineplex.core.common.util.C;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.games.castlesiegenew.CastleSiegeNew;
import nautilus.game.arcade.game.games.castlesiegenew.perks.PerkPaladinBoost;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
@ -134,7 +135,7 @@ public class KitHumanPaladin extends KitCastleSiege
{
super(manager, "Castle Paladin", KitAvailability.Free, DESCRIPTION, PERKS, UPGRADES, EntityType.ZOMBIE, IN_HAND);
//setAchievementRequirements(CastleSiegeNew.getGameAchievements());
setAchievementRequirements(CastleSiegeNew.getGameAchievements());
}
@Override

View File

@ -1,23 +1,25 @@
package nautilus.game.arcade.game.games.castlesiegenew.kits;
import java.util.concurrent.TimeUnit;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.achievement.Achievement;
import mineplex.core.achievement.AchievementCategory;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.disguise.disguises.DisguiseSkeleton;
import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.games.castlesiegenew.CastleSiegeNew;
import nautilus.game.arcade.game.games.castlesiegenew.perks.MobPotion;
import nautilus.game.arcade.game.games.castlesiegenew.perks.PerkMobPotions;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import java.util.concurrent.TimeUnit;
public class KitUndeadSummoner extends KitCastleSiege
{
@ -33,17 +35,14 @@ public class KitUndeadSummoner extends KitCastleSiege
private static final MobPotion SILVER_FISH = new MobPotion(
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SLIME))
.setTitle(C.cGreen + "Slime Potion")
.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 0, 0))
.build(), EntityType.SLIME, 3);
private static final MobPotion ZOMBIE = new MobPotion(
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.ZOMBIE))
.setTitle(C.cGreen + "Zombie Potion")
.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 0, 0))
.build(), EntityType.ZOMBIE, 1);
private static final MobPotion SPIDER = new MobPotion(
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SPIDER))
.setTitle(C.cGreen + "Spider Egg")
.addPotionEffect(new PotionEffect(PotionEffectType.HARM, 0, 0))
.build(), EntityType.SPIDER, 1);
private static final Perk[][] PERKS = {
@ -91,7 +90,7 @@ public class KitUndeadSummoner extends KitCastleSiege
{
super(manager, "Undead Summoner", KitAvailability.Free, DESCRIPTION, PERKS, UPGRADES, EntityType.SKELETON, IN_HAND);
//setAchievementRequirements(CastleSiegeNew.getGameAchievements());
setAchievementRequirements(CastleSiegeNew.getGameAchievements());
_witherSkeleton = true;
}