make it possible to add stats to the brawl games

This commit is contained in:
xXVevzZXx 2016-05-22 00:29:58 +02:00
parent f5d0f5209e
commit c984bbfc8a
43 changed files with 439 additions and 324 deletions

View File

@ -81,7 +81,9 @@ public enum GameDisplay
Valentines("Valentines Vendetta", Material.LEATHER, (byte)0, GameCategory.EXTRA, 61),
Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999);
Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999),
Brawl("Brawl", Material.DIAMOND, (byte) 0, GameCategory.EVENT, 998);
String _name;
String _lobbyName;

View File

@ -699,7 +699,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
// }
//UHC Timed
if (_game != null && _game.GetType() == GameType.UHC)
if (_game != null && (_game.GetType() == GameType.UHC || _game.getClass().getSuperclass().equals(UHC.class)))
{
event.setMotd(((UHC) _game).getMotdStatus() + extrainformation);
}

View File

@ -11,6 +11,7 @@ public class GameMode
{
private Class<? extends Game> _gameMode;
private GameType _gameType;
private String _name;
/**
@ -18,9 +19,10 @@ public class GameMode
* @param gameMode Game class that in most cases extends the host game class
* @param name Gamemode name
*/
public GameMode(Class<? extends Game> gameMode, String name)
public GameMode(Class<? extends Game> gameMode, GameType gameType, String name)
{
_gameMode = gameMode;
_gameType = gameType;
_name = name;
}
@ -41,5 +43,14 @@ public class GameMode
{
return _name;
}
/**
*
* @return Gamemode gametype
*/
public GameType getType()
{
return _gameType;
}
}

View File

@ -55,7 +55,6 @@ import nautilus.game.arcade.game.games.paintball.Paintball;
import nautilus.game.arcade.game.games.quiver.Quiver;
import nautilus.game.arcade.game.games.quiver.QuiverTeams;
import nautilus.game.arcade.game.games.quiver.modes.BunnyHop ;
import nautilus.game.arcade.game.games.quiver.modes.TwoQuiver ;
import nautilus.game.arcade.game.games.rings.ElytraRings;
import nautilus.game.arcade.game.games.runner.Runner;
import nautilus.game.arcade.game.games.runner.modes.FasterThanLight;
@ -102,7 +101,7 @@ public enum GameType
BaconBrawl(BaconBrawl.class, GameDisplay.BaconBrawl),
Barbarians(Barbarians.class, GameDisplay.Barbarians),
BossBattles(BossBattles.class, GameDisplay.BossBattles),
Bridge(Bridge.class, new GameMode[]{new GameMode(OverpoweredBridge.class, "OP Bridges"), new GameMode(SpeedBridges.class, "Speed Bridges")}, GameDisplay.Bridge),
Bridge(Bridge.class, GameDisplay.Bridge),
CastleSiege(CastleSiege.class, GameDisplay.CastleSiege),
ChampionsCTF(ChampionsCTF.class, GameDisplay.ChampionsCTF),
ChampionsDominate(ChampionsDominate.class, GameDisplay.ChampionsDominate),
@ -128,11 +127,11 @@ public enum GameType
{
Pair.create(MinecraftVersion.ALL, "http://file.mineplex.com/ResHalloween.zip")
}, true),
HideSeek(HideSeek.class, new GameMode[]{new GameMode(Countdown.class, "Countdown")}, GameDisplay.HideSeek),
HideSeek(HideSeek.class, GameDisplay.HideSeek),
HoleInTheWall(HoleInTheWall.class, GameDisplay.HoleInTheWall),
Horse(Horse.class, GameDisplay.Horse),
Lobbers(BombLobbers.class, GameDisplay.Lobbers),
Micro(Micro.class, new GameMode[]{new GameMode(TinyWinners.class, "Tiny Winners")}, GameDisplay.Micro),
Micro(Micro.class, GameDisplay.Micro),
MilkCow(MilkCow.class, GameDisplay.MilkCow),
MineStrike(MineStrike.class, GameDisplay.MineStrike, new Pair[]
{
@ -143,42 +142,42 @@ public enum GameType
MinecraftLeague(MinecraftLeague.class, GameDisplay.Minecraft_League),
OldMineWare(OldMineWare.class, GameDisplay.OldMineWare),
Paintball(Paintball.class, GameDisplay.Paintball),
Quiver(Quiver.class, new GameMode[]{new GameMode(BunnyHop.class, "Bunny Hop"), new GameMode(TwoQuiver.class, "Two In The Quiver")}, GameDisplay.Quiver),
Quiver(Quiver.class, GameDisplay.Quiver),
QuiverTeams(QuiverTeams.class, GameDisplay.QuiverTeams),
Runner(Runner.class, new GameMode[]{new GameMode(FasterThanLight.class, "Faster Than Light")}, GameDisplay.Runner),
Runner(Runner.class, GameDisplay.Runner),
SearchAndDestroy(SearchAndDestroy.class, GameDisplay.SearchAndDestroy),
Sheep(SheepGame.class, new GameMode[]{new GameMode(EweHeroes.class, "Heroes Of The Ewe")}, GameDisplay.Sheep),
Sheep(SheepGame.class, GameDisplay.Sheep),
TypeWars(TypeWars.class, GameDisplay.TypeWars),
Smash(SoloSuperSmash.class, new GameMode[]{new GameMode(RandomKitSSM.class, "Random Kit SSM")}, GameDisplay.Smash),
Smash(SoloSuperSmash.class, GameDisplay.Smash),
SmashDomination(SuperSmashDominate.class, GameDisplay.SmashDomination),
SmashTeams(TeamSuperSmash.class, GameDisplay.SmashTeams, new GameType[]{GameType.Smash}, false),
Snake(Snake.class, GameDisplay.Snake),
SneakyAssassins(SneakyAssassins.class, GameDisplay.SneakyAssassins),
SnowFight(SnowFight.class, GameDisplay.SnowFight),
SpeedBuilders(SpeedBuilders.class, GameDisplay.SpeedBuilders),
Spleef(Spleef.class, new GameMode[]{new GameMode(UltraSpleef.class, "Ultra Spleef")}, GameDisplay.Spleef),
Spleef(Spleef.class, GameDisplay.Spleef),
SpleefTeams(SpleefTeams.class, GameDisplay.SpleefTeams),
SquidShooter(SquidShooter.class, GameDisplay.SquidShooter),
Stacker(Stacker.class, GameDisplay.Stacker),
SurvivalGames(SoloSurvivalGames.class, new GameMode[]{new GameMode(OverpoweredSurvival.class, "OP Survival Games"), new GameMode(UHCSurvivalgames.class, "UHC Survivalgames ")}, GameDisplay.SurvivalGames),
SurvivalGames(SoloSurvivalGames.class, GameDisplay.SurvivalGames),
SurvivalGamesTeams(TeamSurvivalGames.class, GameDisplay.SurvivalGamesTeams, new GameType[]{GameType.SurvivalGames}, false),
Tug(Tug.class, GameDisplay.Tug),
TurfWars(TurfForts.class, GameDisplay.TurfWars),
UHC(UHC.class, new GameMode[]{new GameMode(CutClean.class, "Cut Clean"), new GameMode(GodBattles.class, "God Battles"), new GameMode(BloodDiamonds.class, "Blood Diamonds"), new GameMode(Assassins.class, "Assassins")}, GameDisplay.UHC),
UHC(UHC.class, GameDisplay.UHC),
WitherAssault(WitherGame.class, GameDisplay.WitherAssault),
Wizards(Wizards.class, GameDisplay.Wizards, new Pair[]
{
Pair.create(MinecraftVersion.ALL, "http://file.mineplex.com/ResWizards.zip")
}, true),
ZombieSurvival(ZombieSurvival.class, GameDisplay.ZombieSurvival),
Build(Build.class, new GameMode[]{new GameMode(TeamBuild.class, "Team Master Builders"), new GameMode(DukesOfDecoration.class, "Dukes Of Decoration")}, GameDisplay.Build),
Build(Build.class, GameDisplay.Build),
Cards(Cards.class, GameDisplay.Cards),
Skywars(SoloSkywars.class, new GameMode[]{new GameMode(UHCSkywars.class, "UHC Skywars")}, GameDisplay.Skywars),
SkywarsTeams(TeamSkywars.class, new GameMode[]{new GameMode(OverpoweredSkywars.class, "OP Skywars")}, GameDisplay.SkywarsTeams, new GameType[]{GameType.Skywars}, false),
Skywars(SoloSkywars.class, GameDisplay.Skywars),
SkywarsTeams(TeamSkywars.class, GameDisplay.SkywarsTeams, new GameType[]{GameType.Skywars}, false),
MonsterMaze(MonsterMaze.class, GameDisplay.MonsterMaze),
MonsterLeague(MonsterLeague.class, GameDisplay.MonsterLeague),
Gladiators(Gladiators.class, new GameMode[]{new GameMode(OverpoweredGladiators.class, "OP Gladiators"), new GameMode(ChampionsGladiators.class, "Champions Gladiators")}, GameDisplay.Gladiators),
Gladiators(Gladiators.class, GameDisplay.Gladiators),
BouncyBalls(BouncyBalls.class, GameDisplay.BouncyBalls),
@ -194,7 +193,24 @@ public enum GameType
GameType.Sheep, GameType.Skywars, GameType.SkywarsTeams, GameType.Smash, GameType.SmashDomination, GameType.SmashTeams,
GameType.Snake, GameType.SneakyAssassins, GameType.SnowFight, GameType.Spleef, GameType.SpleefTeams, GameType.SquidShooter,
GameType.Stacker, GameType.SurvivalGames, GameType.SurvivalGamesTeams, GameType.Tug, GameType.TurfWars, GameType.UHC,
GameType.WitherAssault, GameType.Wizards, GameType.ZombieSurvival}, true);
GameType.WitherAssault, GameType.Wizards, GameType.ZombieSurvival}, true),
Brawl(null, new GameMode[]{
new GameMode(OverpoweredBridge.class, GameType.Bridge, "OP Bridges"), new GameMode(SpeedBridges.class, GameType.Bridge, "Speed Bridges"),
new GameMode(OverpoweredGladiators.class, GameType.Gladiators, "OP Gladiators"), new GameMode(ChampionsGladiators.class, GameType.Gladiators, "Champions Gladiators"),
new GameMode(OverpoweredSkywars.class, GameType.Skywars, "OP Skywars"), new GameMode(UHCSkywars.class, GameType.Skywars, "UHC Skywars"),
new GameMode(TeamBuild.class, GameType.Build, "Team Master Builders"), new GameMode(DukesOfDecoration.class, GameType.Build, "Dukes Of Decoration"),
new GameMode(CutClean.class, GameType.UHC, "Cut Clean"), new GameMode(GodBattles.class, GameType.UHC, "God Battles"),
new GameMode(BloodDiamonds.class, GameType.UHC, "Blood Diamonds"), new GameMode(Assassins.class, GameType.UHC, "Assassins"),
new GameMode(OverpoweredSurvival.class, GameType.SurvivalGames, "OP Survival Games"), new GameMode(UHCSurvivalgames.class, GameType.SurvivalGames, "UHC Survivalgames"),
new GameMode(UltraSpleef.class, GameType.Spleef, "Ultra Spleef"),
new GameMode(RandomKitSSM.class, GameType.Smash, "Random Kit SSM"),
new GameMode(EweHeroes.class, GameType.Sheep, "Heroes Of The Ewe"),
new GameMode(FasterThanLight.class, GameType.Runner, "Faster Than Light"),
new GameMode(BunnyHop.class, GameType.Quiver, "Bunny Hop"),
new GameMode(TinyWinners.class, GameType.Micro, "Tiny Winners"),
new GameMode(Countdown.class, GameType.HideSeek, "Countdown"),
}, GameDisplay.Brawl, null, false, null, false, true);
GameDisplay _display;
boolean _enforceResourcePack;
@ -204,41 +220,42 @@ public enum GameType
Class<? extends Game> _gameClass;
GameMode[] _gameModes;
private boolean _gameMaps;
private int _gameId; // Unique identifying id for this gamemode (used for statistics)
public int getGameId() { return _gameId; }
GameType(Class<? extends Game> gameClass, GameDisplay display)
{
this(gameClass, new GameMode[]{}, display, null, false, null, true);
this(gameClass, new GameMode[]{}, display, null, false, null, true, false);
}
GameType(Class<? extends Game> gameClass, GameDisplay display, Pair<MinecraftVersion, String>[] resourcePackUrl, boolean enforceResourcePack)
{
this(gameClass, new GameMode[]{}, display, resourcePackUrl, enforceResourcePack, null, true);
this(gameClass, new GameMode[]{}, display, resourcePackUrl, enforceResourcePack, null, true, false);
}
GameType(Class<? extends Game> gameClass, GameDisplay display, GameType[] mapSource, boolean ownMap)
{
this(gameClass, new GameMode[]{}, display, null, false, mapSource, ownMap);
this(gameClass, new GameMode[]{}, display, null, false, mapSource, ownMap, false);
}
GameType(Class<? extends Game> gameClass, GameMode[] gameModes, GameDisplay display)
{
this(gameClass, gameModes, display, null, false, null, true);
this(gameClass, gameModes, display, null, false, null, true, false);
}
GameType(Class<? extends Game> gameClass, GameMode[] gameModes, GameDisplay display, Pair<MinecraftVersion, String>[] resourcePackUrl, boolean enforceResourcePack)
{
this(gameClass, gameModes, display, resourcePackUrl, enforceResourcePack, null, true);
this(gameClass, gameModes, display, resourcePackUrl, enforceResourcePack, null, true, false);
}
GameType(Class<? extends Game> gameClass, GameMode[] gameModes, GameDisplay display, GameType[] mapSource, boolean ownMap)
{
this(gameClass, gameModes, display, null, false, mapSource, ownMap);
this(gameClass, gameModes, display, null, false, mapSource, ownMap, false);
}
GameType(Class<? extends Game> gameClass, GameMode[] gameModes, GameDisplay display, Pair<MinecraftVersion, String>[] resourcePackUrls, boolean enforceResourcePack, GameType[] mapSource, boolean ownMaps)
GameType(Class<? extends Game> gameClass, GameMode[] gameModes, GameDisplay display, Pair<MinecraftVersion, String>[] resourcePackUrls, boolean enforceResourcePack, GameType[] mapSource, boolean ownMaps, boolean gameMaps)
{
_display = display;
_gameId = display.getGameId();
@ -248,6 +265,7 @@ public enum GameType
_enforceResourcePack = enforceResourcePack;
_mapSource = mapSource;
_ownMaps = ownMaps;
_gameMaps = gameMaps;
}
public Class<? extends Game> getGameClass()
@ -309,4 +327,21 @@ public enum GameType
{
return _display.getKitGameName();
}
public boolean isUsingGameModes()
{
return _gameMaps;
}
public GameType getModeGameType(Class<? extends Game> game)
{
for (GameMode mode : getGameModes())
{
if (mode.getGameClass() != null && mode.getGameClass().getName().contentEquals(game.getName()))
{
return mode.getType();
}
}
return null;
}
}

View File

@ -466,6 +466,7 @@ public abstract class Game implements Listener
{
GetType()
};
if (GetType().getMapSource() != null)
{
if (GetType().ownMaps())
@ -484,6 +485,16 @@ public abstract class Game implements Listener
mapSource = GetType().getMapSource();
}
}
if (GetType().isUsingGameModes())
{
GameType mode = GetType().getModeGameType(getClass());
if (mode.getMapSource() != null)
return mode.getMapSource();
else
return new GameType[]{mode};
}
return mapSource;
}

View File

@ -68,6 +68,7 @@ import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.explosion.ExplosionEvent;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -153,9 +154,33 @@ public class Bridge extends TeamGame implements OreObsfucation
private HashMap<GameTeam, Integer> _tournamentKills = new HashMap<GameTeam, Integer>();
private long _tournamentKillMessageTimer = 0;
public Bridge(ArcadeManager manager)
{
super(manager, GameType.Bridge,
this(manager, GameType.Bridge);
registerStatTrackers(
new FoodForTheMassesStatTracker(this),
new BridgesSniperStatTracker(this),
new TntMinerStatTracker(this),
new KillFastStatTracker(this, 4, 10, "Rampage"),
new DeathBomberStatTracker(this, 5)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
public Bridge(ArcadeManager manager, GameType type)
{
super(manager, type,
new Kit[]
{
@ -230,24 +255,6 @@ public class Bridge extends TeamGame implements OreObsfucation
_tournament = Manager.IsTournamentServer();
registerStatTrackers(
new FoodForTheMassesStatTracker(this),
new BridgesSniperStatTracker(this),
new TntMinerStatTracker(this),
new KillFastStatTracker(this, 4, 10, "Rampage"),
new DeathBomberStatTracker(this, 5)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@EventHandler

View File

@ -23,6 +23,7 @@ import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
import nautilus.game.arcade.game.Game.GameState;
@ -43,7 +44,7 @@ public class OverpoweredBridge extends Bridge
public OverpoweredBridge(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
WorldBoundaryKill = true;

View File

@ -6,8 +6,17 @@ import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.bridge.Bridge;
import nautilus.game.arcade.game.games.bridge.kits.KitApple;
import nautilus.game.arcade.game.games.bridge.kits.KitArcher;
import nautilus.game.arcade.game.games.bridge.kits.KitBeserker;
import nautilus.game.arcade.game.games.bridge.kits.KitBomber;
import nautilus.game.arcade.game.games.bridge.kits.KitDestructor;
import nautilus.game.arcade.game.games.bridge.kits.KitMammoth;
import nautilus.game.arcade.game.games.bridge.kits.KitMiner;
import nautilus.game.arcade.kit.Kit;
/**
* SpeedBridges gamemode for Bridges
@ -21,7 +30,7 @@ public class SpeedBridges extends Bridge
public SpeedBridges(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
_untilBridges = 20000;
}

View File

@ -153,7 +153,22 @@ public class Build extends Game
public Build(ArcadeManager manager)
{
super(manager, GameType.Build,
this(manager, GameType.Build);
registerStatTrackers(
new BlockBreakStatTracker(this, false),
new BlockPlaceStatTracker(this, new Material[]{})
);
registerChatStats(
new ChatStatData("BlocksPlaced", "Blocks Placed", true),
new ChatStatData("BlocksBroken", "Blocks Broken", true)
);
}
public Build(ArcadeManager manager, GameType type)
{
super(manager, type,
new Kit[]
{
@ -223,16 +238,6 @@ public class Build extends Game
_mobShop = new MobShop(getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
_optionsShop = new OptionsShop(this, getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
_shopItem = ItemStackFactory.Instance.CreateStack(Material.DIAMOND, (byte) 0, 1, C.cGreen + "Options");
registerStatTrackers(
new BlockBreakStatTracker(this, false),
new BlockPlaceStatTracker(this, new Material[]{})
);
registerChatStats(
new ChatStatData("BlocksPlaced", "Blocks Placed", true),
new ChatStatData("BlocksBroken", "Blocks Broken", true)
);
}
@EventHandler

View File

@ -28,6 +28,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
import nautilus.game.arcade.game.games.build.Build;
@ -45,7 +46,7 @@ public class DukesOfDecoration extends Build
public DukesOfDecoration(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
List<Material> notAllowed = Arrays.asList(new Material[]{
Material.COMMAND,

View File

@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.build.Build;
@ -36,7 +37,7 @@ public class TeamBuild extends Build
public TeamBuild(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
TeamMode = true;
PlayerTeamSelection = true;

View File

@ -92,14 +92,33 @@ public class Gladiators extends SoloGame
public Gladiators(ArcadeManager manager)
{
this(manager, new Kit[]
{
new KitGladiator(manager)
});
{
new KitGladiator(manager)
},
GameType.Gladiators);
registerStatTrackers(
new BrawlerTracker(this),
new UntouchableTracker(this),
new FlawlessTracker(this),
new PrecisionTracker(this),
new SwiftKillTracker(this)
);
registerChatStats(
Kills,
Assists,
BlankLine,
new ChatStatData("Untouchable", "Untouchable", true),
BlankLine,
DamageDealt,
DamageTaken
);
}
public Gladiators(ArcadeManager manager, Kit[] kits)
public Gladiators(ArcadeManager manager, Kit[] kits, GameType type)
{
super(manager, GameType.Gladiators, kits,
super(manager, type, kits,
new String[]
{
"This is a 1v1 tournament!",
@ -120,24 +139,6 @@ public class Gladiators extends SoloGame
BlockBreakAllow.add(Material.DEAD_BUSH.getId());
BlockBreakAllow.add(Material.LONG_GRASS.getId());
registerStatTrackers(
new BrawlerTracker(this),
new UntouchableTracker(this),
new FlawlessTracker(this),
new PrecisionTracker(this),
new SwiftKillTracker(this)
);
registerChatStats(
Kills,
Assists,
BlankLine,
new ChatStatData("Untouchable", "Untouchable", true),
BlankLine,
DamageDealt,
DamageTaken
);
_playerArenas = new HashMap<>();
_roundState = RoundState.WAITING;

View File

@ -6,6 +6,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityRegainHealthEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.champions.ChampionsFixes;
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
@ -35,7 +36,7 @@ public class ChampionsGladiators extends Gladiators
new KitKnight(manager),
new KitMage(manager),
new KitAssassin(manager),
});
}, GameType.Brawl);
Manager.GetDamage().UseSimpleWeaponDamage = false;
Manager.getCosmeticManager().setHideParticles(true);

View File

@ -11,10 +11,13 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilItem;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.games.gladiators.Arena;
import nautilus.game.arcade.game.games.gladiators.ArenaType;
import nautilus.game.arcade.game.games.gladiators.Gladiators;
import nautilus.game.arcade.game.games.gladiators.hotbar.HotbarLayout;
import nautilus.game.arcade.game.games.gladiators.kits.KitGladiator;
import nautilus.game.arcade.kit.Kit;
/**
* OverpoweredGladiators gamemode for Gladiators
@ -26,7 +29,11 @@ public class OverpoweredGladiators extends Gladiators
public OverpoweredGladiators(ArcadeManager manager)
{
super(manager);
super(manager, new Kit[]
{
new KitGladiator(manager)
},
GameType.Brawl);
}
@Override

View File

@ -30,9 +30,9 @@ public class Micro extends TeamGame
private ArrayList<Block> _blocks = new ArrayList<Block>();
private ArrayList<Block> _glass = new ArrayList<Block>();
public Micro(ArcadeManager manager, Kit[] kits)
public Micro(ArcadeManager manager, Kit[] kits, GameType type)
{
super(manager, GameType.Micro, kits,
super(manager, type, kits,
new String[]
{
"Small game, big strategy!",
@ -50,6 +50,19 @@ public class Micro extends TeamGame
this.BlockBreak = true;
this.BlockPlace = true;
}
public Micro(ArcadeManager manager)
{
this(manager,
new Kit[]
{
new KitArcher(manager),
new KitWorker(manager),
new KitFighter(manager)
},
GameType.Micro);
registerStatTrackers(
new KillsWithinGameStatTracker(this, 8, "Annihilation")
@ -64,18 +77,6 @@ public class Micro extends TeamGame
);
}
public Micro(ArcadeManager manager)
{
this(manager,
new Kit[]
{
new KitArcher(manager),
new KitWorker(manager),
new KitFighter(manager)
});
}
@Override
public void ParseData()
{

View File

@ -6,6 +6,7 @@ import org.bukkit.event.EventHandler;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
@ -28,8 +29,11 @@ public class TinyWinners extends Micro
super(manager,
new Kit[]
{ new KitBrute(manager), new KitRanger(manager), new KitKnight(manager),
new KitMage(manager), new KitAssassin(manager), });
{
new KitBrute(manager), new KitRanger(manager), new KitKnight(manager),
new KitMage(manager), new KitAssassin(manager)
},
GameType.Brawl);
Manager.GetDamage().UseSimpleWeaponDamage = false;
Manager.getCosmeticManager().setHideParticles(true);

View File

@ -61,12 +61,28 @@ public class Quiver extends SoloGame
new KitEnchanter(manager),
new KitSlamShot(manager),
new KitNinja(manager)
});
}, GameType.Quiver);
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "Perfectionist"),
new SharpShooterStatTracker(this),
new WinWithoutBowStatTracker(this, "WhatsABow")
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
public Quiver(ArcadeManager manager, Kit[] kits)
public Quiver(ArcadeManager manager, Kit[] kits, GameType type)
{
super(manager, GameType.Quiver, kits,
super(manager, type, kits,
new String[]
{
"Bow and Arrow insta-kills.",
@ -89,22 +105,6 @@ public class Quiver extends SoloGame
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("Kills", "dummy");
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "Perfectionist"),
new SharpShooterStatTracker(this),
new WinWithoutBowStatTracker(this, "WhatsABow")
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@EventHandler(priority = EventPriority.HIGH)

View File

@ -11,6 +11,7 @@ import mineplex.core.itemstack.ItemStackFactory;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.quiver.Quiver;
import nautilus.game.arcade.game.games.quiver.kits.KitSlamShot;
@ -32,7 +33,7 @@ public class BunnyHop extends Quiver
super(manager, new Kit[]
{
new KitModedLeaper(manager)
});
}, GameType.Brawl);
_arrowAmount = 2;
}

View File

@ -1,95 +0,0 @@
package nautilus.game.arcade.game.games.quiver.modes;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.quiver.Quiver;
import nautilus.game.arcade.game.games.quiver.kits.KitSlamShot;
/**
* TwoQuiver gamemode for One in the quiver
*
* @author xXVevzZXx
*/
public class TwoQuiver extends Quiver
{
private int _arrowAmount;
public TwoQuiver(ArcadeManager manager)
{
super(manager);
_arrowAmount = 2;
}
@Override
@EventHandler(priority = EventPriority.HIGH)
public void GameStateChange(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Live)
return;
for (Player player : GetPlayers(true))
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 2, F.item("Super Arrow")));
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
}
}
@Override
@EventHandler
public void Death(CombatDeathEvent event)
{
if (event.GetEvent().getEntity() instanceof Player)
{
getDeathTime().put((Player) event.GetEvent().getEntity(), System.currentTimeMillis());
}
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (player == null)
return;
int amount = _arrowAmount;
if (GetKit(player) instanceof KitSlamShot)
{
if (Manager.GetCondition().HasCondition(event.GetEvent().getEntity(),
ConditionType.FALLING, null))
{
amount = _arrowAmount * 2;
}
}
//New Arrow
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte) 0, amount,
F.item("Super Arrow")));
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
//Score
AddKill(player);
}
@Override
public String GetMode()
{
return "Two In The Quiver";
}
}

View File

@ -43,7 +43,20 @@ public class Runner extends SoloGame implements IThrown
public Runner(ArcadeManager manager)
{
super(manager, GameType.Runner,
this(manager, GameType.Runner);
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
registerChatStats(
new ChatStatData("MarathonRunner", "Distance ran", true),
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
public Runner(ArcadeManager manager, GameType type)
{
super(manager, type,
new Kit[]
{
@ -65,14 +78,6 @@ public class Runner extends SoloGame implements IThrown
this.WorldWaterDamage = 4;
this.PrepareFreeze = false;
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
registerChatStats(
new ChatStatData("MarathonRunner", "Distance ran", true),
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -130,12 +130,27 @@ public class SheepGame extends TeamGame
new KitBeserker(manager),
new KitArcher(manager),
new KitBrute(manager)
});
}, GameType.Sheep);
registerStatTrackers(
new SheepThiefStatTracker(this),
new SheepDropStatTracker(this),
new WinWithSheepStatTracker(this)
);
registerChatStats(
new ChatStatData("AnimalRescue", "Captures", true),
new ChatStatData("Thief", "Stolen", true),
BlankLine,
Kills,
Deaths,
KDRatio
);
}
public SheepGame(ArcadeManager manager, Kit[] kits)
public SheepGame(ArcadeManager manager, Kit[] kits, GameType type)
{
super(manager, GameType.Sheep, kits,
super(manager, type, kits,
new String[]
{
@ -153,21 +168,6 @@ public class SheepGame extends TeamGame
this.TeamArmor = true;
this.TeamArmorHotbar = true;
registerStatTrackers(
new SheepThiefStatTracker(this),
new SheepDropStatTracker(this),
new WinWithSheepStatTracker(this)
);
registerChatStats(
new ChatStatData("AnimalRescue", "Captures", true),
new ChatStatData("Thief", "Stolen", true),
BlankLine,
Kills,
Deaths,
KDRatio
);
}
@Override

View File

@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.champions.ChampionsFixes;
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
@ -38,7 +39,7 @@ public class EweHeroes extends SheepGame
new KitKnight(manager),
new KitMage(manager),
new KitAssassin(manager),
});
}, GameType.Brawl);
Manager.GetDamage().UseSimpleWeaponDamage = false;
Manager.getCosmeticManager().setHideParticles(true);

View File

@ -132,7 +132,7 @@ public abstract class Skywars extends Game
private ChestLoot _middleTool = new ChestLoot();
private ChestLoot _middleProjectile = new ChestLoot();
private ChestLoot _middleBlock = new ChestLoot();
@SuppressWarnings("unchecked")
public Skywars(ArcadeManager manager, GameType type, String[] description)
{
@ -195,23 +195,6 @@ public abstract class Skywars extends Game
setAlreadyAnnounced(false);
registerStatTrackers(
new SkywarsTNTStatTracker(this),
new DeathBomberStatTracker(this, 3), //TNT Kills
new SkywarsKillZombieStatTracker(this),
new WinWithoutOpeningChestStatTracker(this),
new WinWithoutWearingArmorStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
public void ParseData()

View File

@ -18,6 +18,11 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.stats.DeathBomberStatTracker;
import nautilus.game.arcade.stats.SkywarsKillZombieStatTracker;
import nautilus.game.arcade.stats.SkywarsTNTStatTracker;
import nautilus.game.arcade.stats.WinWithoutOpeningChestStatTracker;
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
public class SoloSkywars extends Skywars
{
@ -26,7 +31,29 @@ public class SoloSkywars extends Skywars
public SoloSkywars(ArcadeManager manager)
{
super(manager, GameType.Skywars,
this(manager, GameType.Skywars);
registerStatTrackers(
new SkywarsTNTStatTracker(this),
new DeathBomberStatTracker(this, 3), //TNT Kills
new SkywarsKillZombieStatTracker(this),
new WinWithoutOpeningChestStatTracker(this),
new WinWithoutWearingArmorStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
public SoloSkywars(ArcadeManager manager, GameType type)
{
super(manager, type,
new String[]
{
"Free for all battle in the sky!",
@ -35,6 +62,23 @@ public class SoloSkywars extends Skywars
});
this.DamageTeamSelf = true;
registerStatTrackers(
new SkywarsTNTStatTracker(this),
new DeathBomberStatTracker(this, 3), //TNT Kills
new SkywarsKillZombieStatTracker(this),
new WinWithoutOpeningChestStatTracker(this),
new WinWithoutWearingArmorStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}

View File

@ -19,6 +19,11 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.stats.DeathBomberStatTracker;
import nautilus.game.arcade.stats.SkywarsKillZombieStatTracker;
import nautilus.game.arcade.stats.SkywarsTNTStatTracker;
import nautilus.game.arcade.stats.WinWithoutOpeningChestStatTracker;
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -36,7 +41,29 @@ public class TeamSkywars extends Skywars
public TeamSkywars(ArcadeManager manager)
{
super(manager, GameType.SkywarsTeams,
this(manager, GameType.SkywarsTeams);
registerStatTrackers(
new SkywarsTNTStatTracker(this),
new DeathBomberStatTracker(this, 3), //TNT Kills
new SkywarsKillZombieStatTracker(this),
new WinWithoutOpeningChestStatTracker(this),
new WinWithoutWearingArmorStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
public TeamSkywars(ArcadeManager manager, GameType type)
{
super(manager, type,
new String[]
{
"Free for all battle in the sky!",

View File

@ -13,6 +13,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.loot.ChestLoot;
import mineplex.core.loot.RandomItem;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.games.AbsorptionFix;
import nautilus.game.arcade.game.games.skywars.TeamSkywars;
@ -38,7 +39,7 @@ public class OverpoweredSkywars extends TeamSkywars
public OverpoweredSkywars(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
new AbsorptionFix(this);
}

View File

@ -11,6 +11,7 @@ import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.AbsorptionFix;
@ -26,7 +27,7 @@ public class UHCSkywars extends SoloSkywars
public UHCSkywars(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
SoupEnabled = false;

View File

@ -18,6 +18,11 @@ import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.FreeKitWinStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.OneVThreeStatTracker;
import nautilus.game.arcade.stats.RecoveryMasterStatTracker;
import nautilus.game.arcade.stats.WinWithoutDyingStatTracker;
public class SoloSuperSmash extends SuperSmash
{
@ -35,6 +40,14 @@ public class SoloSuperSmash extends SuperSmash
this.DamageTeamSelf = true;
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "MLGPro"),
new FreeKitWinStatTracker(this),
new OneVThreeStatTracker(this),
new KillFastStatTracker(this, 3, 10, "TripleKill"),
new RecoveryMasterStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
@ -48,9 +61,9 @@ public class SoloSuperSmash extends SuperSmash
);
}
public SoloSuperSmash(ArcadeManager manager, Kit[] kits)
public SoloSuperSmash(ArcadeManager manager, Kit[] kits, GameType type)
{
super(manager, kits, GameType.Smash, new String[]
super(manager, kits, type, new String[]
{
"Each player has 3 respawns",
"Attack to restore hunger!",
@ -58,18 +71,6 @@ public class SoloSuperSmash extends SuperSmash
});
this.DamageTeamSelf = true;
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -136,14 +136,6 @@ public abstract class SuperSmash extends Game
// Add stat table here
// Example
// Manager.GetStatsManager().addTable("SuperSmashMobStats", "Kills", "Deaths", "Wins", "Losses");
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "MLGPro"),
new FreeKitWinStatTracker(this),
new OneVThreeStatTracker(this),
new KillFastStatTracker(this, 3, 10, "TripleKill"),
new RecoveryMasterStatTracker(this)
);
}
@EventHandler(priority = EventPriority.HIGH)

View File

@ -16,6 +16,11 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.FreeKitWinStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.OneVThreeStatTracker;
import nautilus.game.arcade.stats.RecoveryMasterStatTracker;
import nautilus.game.arcade.stats.WinWithoutDyingStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -52,6 +57,14 @@ public class TeamSuperSmash extends SuperSmash
TeamMode = true;
PlayerTeamSelection = true;
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "MLGPro"),
new FreeKitWinStatTracker(this),
new OneVThreeStatTracker(this),
new KillFastStatTracker(this, 3, 10, "TripleKill"),
new RecoveryMasterStatTracker(this)
);
registerChatStats(
Kills,
Deaths,

View File

@ -9,6 +9,7 @@ import org.bukkit.event.entity.EntityDeathEvent;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.smash.SoloSuperSmash;
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
@ -48,7 +49,7 @@ public class RandomKitSSM extends SoloSuperSmash
public RandomKitSSM(ArcadeManager manager)
{
super(manager, new Kit[]{new KitPlayer(manager)});
super(manager, new Kit[]{new KitPlayer(manager)}, GameType.Brawl);
_maxLives = 5;

View File

@ -15,6 +15,10 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.FirstSupplyDropOpenStatTracker;
import nautilus.game.arcade.stats.KillsWithinTimeLimitStatTracker;
import nautilus.game.arcade.stats.SimultaneousSkeletonStatTracker;
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@ -27,7 +31,27 @@ public class SoloSurvivalGames extends SurvivalGames
public SoloSurvivalGames(ArcadeManager manager)
{
super(manager, GameType.SurvivalGames,
this(manager, GameType.SurvivalGames);
registerStatTrackers(new WinWithoutWearingArmorStatTracker(this),
new KillsWithinTimeLimitStatTracker(this, 3, 60, "Bloodlust"),
new FirstSupplyDropOpenStatTracker(this),
new SimultaneousSkeletonStatTracker(this, 5));
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Event chests opened", true)
);
}
public SoloSurvivalGames(ArcadeManager manager, GameType type)
{
super(manager, type,
new String[]
{
"Search for chests to find loot",
@ -39,8 +63,7 @@ public class SoloSurvivalGames extends SurvivalGames
"Last tribute alive wins!"
});
this.DamageTeamSelf = true;
this.DamageTeamSelf = true;
}
@EventHandler

View File

@ -256,21 +256,6 @@ public abstract class SurvivalGames extends Game
{
ex.printStackTrace();
}
registerStatTrackers(new WinWithoutWearingArmorStatTracker(this),
new KillsWithinTimeLimitStatTracker(this, 3, 60, "Bloodlust"),
new FirstSupplyDropOpenStatTracker(this),
new SimultaneousSkeletonStatTracker(this, 5));
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Event chests opened", true)
);
}
@EventHandler

View File

@ -18,6 +18,10 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.FirstSupplyDropOpenStatTracker;
import nautilus.game.arcade.stats.KillsWithinTimeLimitStatTracker;
import nautilus.game.arcade.stats.SimultaneousSkeletonStatTracker;
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -56,6 +60,21 @@ public class TeamSurvivalGames extends SurvivalGames
DontAllowOverfill = true;
TeamMode = true;
PlayerTeamSelection = true;
registerStatTrackers(new WinWithoutWearingArmorStatTracker(this),
new KillsWithinTimeLimitStatTracker(this, 3, 60, "Bloodlust"),
new FirstSupplyDropOpenStatTracker(this),
new SimultaneousSkeletonStatTracker(this, 5));
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Event chests opened", true)
);
}
@Override

View File

@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.loot.RandomItem;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.AbsorptionFix;
import nautilus.game.arcade.game.games.survivalgames.SoloSurvivalGames;
@ -35,7 +36,7 @@ public class OverpoweredSurvival extends SoloSurvivalGames
public OverpoweredSurvival(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
new AbsorptionFix(this);
}

View File

@ -12,6 +12,7 @@ import org.bukkit.scoreboard.Objective;
import mineplex.core.loot.RandomItem;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.AbsorptionFix;
import nautilus.game.arcade.game.games.survivalgames.SoloSurvivalGames;
@ -26,7 +27,7 @@ public class UHCSurvivalgames extends SoloSurvivalGames
public UHCSurvivalgames(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
SoupEnabled = false;

View File

@ -124,7 +124,20 @@ public class UHC extends TeamGame
public UHC(ArcadeManager manager)
{
super(manager, GameType.UHC,
this(manager, GameType.UHC);
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt
);
}
public UHC(ArcadeManager manager, GameType type)
{
super(manager, type,
new Kit[]
{
@ -207,14 +220,6 @@ public class UHC extends TeamGame
_createTime = System.currentTimeMillis();
_serverTime = Utility.currentTimeMillis();
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt
);
}
@Override

View File

@ -13,6 +13,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.uhc.UHC;
@ -28,7 +29,7 @@ public class Assassins extends UHC
public Assassins(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
}
@EventHandler

View File

@ -7,6 +7,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBreakEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.games.uhc.UHC;
/**
@ -21,7 +22,7 @@ public class BloodDiamonds extends UHC
public BloodDiamonds(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
_oreDamage = new HashMap<>();
_oreDamage.put(Material.DIAMOND_ORE, 1D);

View File

@ -16,6 +16,7 @@ import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.uhc.UHC;
@ -34,7 +35,7 @@ public class CutClean extends UHC
public CutClean(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
_steakAmount = 15;

View File

@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.uhc.UHC;
@ -31,7 +32,7 @@ public class GodBattles extends UHC
public GodBattles(ArcadeManager manager)
{
super(manager);
super(manager, GameType.Brawl);
_ores = new ArrayList<>();

View File

@ -230,6 +230,11 @@ public class GameCreationManager implements Listener
}
}
if (gameClass == null)
{
gameClass = gameType.getGameModes()[UtilMath.r(gameType.getGameModes().length)].getGameClass();
}
ModePref = null;
Game game = gameClass.getConstructor(ArcadeManager.class).newInstance(Manager);

View File

@ -355,7 +355,7 @@ public class GameLobbyManager implements Listener
}
//UHC
if (game.GetType() == GameType.UHC)
if (game.GetType() == GameType.UHC || game.getClass().getSuperclass().equals(UHC.class))
{
if (game.GetTeamList().size() > 1)
{
@ -548,7 +548,7 @@ public class GameLobbyManager implements Listener
block.setType(_kitBlocks.get(block));
_kitBlocks.clear();
if (game.GetKits().length <= 1 && game.GetType() == GameType.UHC)
if (game.GetKits().length <= 1 && (game.GetType() == GameType.UHC || game.getClass().getSuperclass().equals(UHC.class)))
{
WriteKitLine(" ", 0, 159, (byte)15);
WriteKitLine(" ", 1, 159, (byte)4);