From 55f04538979461a1f8a54f2e603db254e565f5d1 Mon Sep 17 00:00:00 2001 From: William Burns Date: Mon, 7 Dec 2015 23:20:03 +0000 Subject: [PATCH] Start of re-write --- .../src/mineplex/core/game/GameDisplay.java | 2 + .../src/nautilus/game/arcade/GameType.java | 2 + .../game/games/gladiators/ArenaType.java | 243 ++++++++++++++++++ .../game/games/gladiators/Gladiators.java | 28 ++ .../arcade/game/games/gladiators/Loadout.java | 22 ++ .../games/gladiators/kits/KitGladiator.java | 38 +++ 6 files changed, 335 insertions(+) create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/ArenaType.java create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Gladiators.java create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Loadout.java create mode 100644 Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/kits/KitGladiator.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java b/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java index 6c43e8729..ebdc89a02 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java @@ -72,6 +72,8 @@ public enum GameDisplay BouncyBalls("Bouncy Balls", Material.SLIME_BALL, (byte)0, GameCategory.ARCADE, 57), + Gladiators("Gladiators", Material.IRON_SWORD, (byte)0, GameCategory.ARCADE, 58), + Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999); String _name; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java index 5eedb306e..5ff9e576c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameType.java @@ -26,6 +26,7 @@ import nautilus.game.arcade.game.games.dragons.DragonsTeams; import nautilus.game.arcade.game.games.draw.Draw; import nautilus.game.arcade.game.games.event.EventGame; import nautilus.game.arcade.game.games.evolution.Evolution; +import nautilus.game.arcade.game.games.gladiators.Gladiators; import nautilus.game.arcade.game.games.gravity.Gravity; import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.hideseek.HideSeek; @@ -128,6 +129,7 @@ public enum GameType SkywarsTeams(TeamSkywars.class, GameDisplay.SkywarsTeams, new GameType[]{GameType.Skywars}, false), MonsterMaze(MonsterMaze.class, GameDisplay.MonsterMaze), MonsterLeague(MonsterLeague.class, GameDisplay.MonsterLeague), + Gladiators(Gladiators.class, GameDisplay.Gladiators), BouncyBalls(BouncyBalls.class, GameDisplay.BouncyBalls), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/ArenaType.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/ArenaType.java new file mode 100644 index 000000000..73506445e --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/ArenaType.java @@ -0,0 +1,243 @@ +package nautilus.game.arcade.game.games.gladiators; + +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; + +/** + * Created by William (WilliamTiger). + * 07/12/15 + */ +public enum ArenaType +{ + + RED(1, new Loadout() + { + @Override + public ItemStack getSword() + { + return new ItemStack(Material.DIAMOND_SWORD, 1); + } + + @Override + public ItemStack getRod() + { + return new ItemStack(Material.FISHING_ROD, 1); + } + + @Override + public ItemStack getBow() + { + return new ItemStack(Material.BOW, 1); + } + + @Override + public ItemStack getArrows() + { + return new ItemStack(Material.ARROW, 10); + } + + @Override + public ItemStack getHelmet() + { + return new ItemStack(Material.IRON_HELMET, 1); + } + + @Override + public ItemStack getChestplate() + { + return new ItemStack(Material.IRON_CHESTPLATE, 1); + } + + @Override + public ItemStack getLeggings() + { + return new ItemStack(Material.IRON_LEGGINGS, 1); + } + + @Override + public ItemStack getBoots() + { + return new ItemStack(Material.IRON_BOOTS, 1); + } + }), + ORANGE(2, new Loadout() + { + @Override + public ItemStack getSword() + { + return new ItemStack(Material.IRON_SWORD, 1); + } + + @Override + public ItemStack getRod() + { + return new ItemStack(Material.FISHING_ROD, 1); + } + + @Override + public ItemStack getBow() + { + return new ItemStack(Material.BOW, 1); + } + + @Override + public ItemStack getArrows() + { + return new ItemStack(Material.ARROW, 7); + } + + @Override + public ItemStack getHelmet() + { + return new ItemStack(Material.CHAINMAIL_HELMET); + } + + @Override + public ItemStack getChestplate() + { + return new ItemStack(Material.CHAINMAIL_CHESTPLATE, 1); + } + + @Override + public ItemStack getLeggings() + { + return new ItemStack(Material.CHAINMAIL_LEGGINGS, 1); + } + + @Override + public ItemStack getBoots() + { + return new ItemStack(Material.CHAINMAIL_BOOTS, 1); + } + }), + YELLOW(4, new Loadout() + { + @Override + public ItemStack getSword() + { + return new ItemStack(Material.STONE_SWORD, 1); + } + + @Override + public ItemStack getRod() + { + return new ItemStack(Material.FISHING_ROD, 1); + } + + @Override + public ItemStack getBow() + { + return new ItemStack(Material.BOW, 1); + } + + @Override + public ItemStack getArrows() + { + return new ItemStack(Material.ARROW, 5); + } + + @Override + public ItemStack getHelmet() + { + return new ItemStack(Material.GOLD_HELMET, 1); + } + + @Override + public ItemStack getChestplate() + { + return new ItemStack(Material.GOLD_CHESTPLATE, 1); + } + + @Override + public ItemStack getLeggings() + { + return new ItemStack(Material.GOLD_LEGGINGS, 1); + } + + @Override + public ItemStack getBoots() + { + return new ItemStack(Material.GOLD_BOOTS, 1); + } + }), + GREEN(8, new Loadout() + { + @Override + public ItemStack getSword() + { + return new ItemStack(Material.WOOD_SWORD, 1); + } + + @Override + public ItemStack getRod() + { + return new ItemStack(Material.FISHING_ROD, 1); + } + + @Override + public ItemStack getBow() + { + return new ItemStack(Material.BOW, 1); + } + + @Override + public ItemStack getArrows() + { + return new ItemStack(Material.ARROW, 3); + } + + @Override + public ItemStack getHelmet() + { + return new ItemStack(Material.LEATHER_HELMET, 1); + } + + @Override + public ItemStack getChestplate() + { + return new ItemStack(Material.LEATHER_CHESTPLATE, 1); + } + + @Override + public ItemStack getLeggings() + { + return new ItemStack(Material.LEATHER_LEGGINGS, 1); + } + + @Override + public ItemStack getBoots() + { + return new ItemStack(Material.LEATHER_BOOTS, 1); + } + }); + + private int _endsAt; + private Loadout _loadout; + + ArenaType(int endsAt, Loadout loadout) + { + _endsAt = endsAt; + _loadout = loadout; + } + + public Loadout getLoadout() + { + return _loadout; + } + + public int getEndsAt() + { + return _endsAt; + } + + public String getName() + { + return toString().toLowerCase(); + } + + public boolean furtherOut(ArenaType other) + { + return !(compareTo(other) <= 0); + } + +} \ No newline at end of file diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Gladiators.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Gladiators.java new file mode 100644 index 000000000..144b191a7 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Gladiators.java @@ -0,0 +1,28 @@ +package nautilus.game.arcade.game.games.gladiators; + +import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.GameType; +import nautilus.game.arcade.game.SoloGame; +import nautilus.game.arcade.game.games.gladiators.kits.KitGladiator; +import nautilus.game.arcade.kit.Kit; + +/** + * Created by William (WilliamTiger). + * 07/12/15 + */ +public class Gladiators extends SoloGame +{ + public Gladiators(ArcadeManager manager) + { + super(manager, GameType.Gladiators, + new Kit[0], + new String[] + { + "This is a 1v1 tournament!", + "Kill and then run to the next arena!", + "There is only one victor!" + }); + + setKits(new Kit[]{new KitGladiator(manager)}); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Loadout.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Loadout.java new file mode 100644 index 000000000..4d9f23c61 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/Loadout.java @@ -0,0 +1,22 @@ +package nautilus.game.arcade.game.games.gladiators; + +import org.bukkit.inventory.ItemStack; + +/** + * Created by William (WilliamTiger). + * 07/12/15 + */ +public interface Loadout +{ + + public ItemStack getSword(); + public ItemStack getRod(); + public ItemStack getBow(); + public ItemStack getArrows(); + + public ItemStack getHelmet(); + public ItemStack getChestplate(); + public ItemStack getLeggings(); + public ItemStack getBoots(); + +} \ No newline at end of file diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/kits/KitGladiator.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/kits/KitGladiator.java new file mode 100644 index 000000000..1a0df8140 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/kits/KitGladiator.java @@ -0,0 +1,38 @@ +package nautilus.game.arcade.game.games.gladiators.kits; + +import org.bukkit.Material; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.kit.Kit; +import nautilus.game.arcade.kit.KitAvailability; +import nautilus.game.arcade.kit.Perk; + +/** + * Created by William (WilliamTiger). + * 07/12/15 + */ +public class KitGladiator extends Kit +{ + public KitGladiator(ArcadeManager manager) + { + super(manager, "Gladiator", KitAvailability.Free, + new String[] + { + "At my signal, unleash hell." + }, + new Perk[] + { + + }, + EntityType.ZOMBIE, new ItemStack(Material.IRON_SWORD)); + } + + @Override + public void GiveItems(Player player) + { + //todo: items based on loadout + } +}