From 4183d6f21d1c7ba228235e5e5ee4ae68a76a781e Mon Sep 17 00:00:00 2001 From: Cheese Date: Sat, 27 Jun 2015 11:40:40 +1000 Subject: [PATCH] some balance --- .../arcade/game/games/skywars/Skywars.java | 10 ++++ .../game/games/skywars/data/TNTGenerator.java | 4 +- .../games/survivalgames/SurvivalGames.java | 47 +++++++++++++++---- .../arcade/managers/GameCreationManager.java | 2 + 4 files changed, 53 insertions(+), 10 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java index 5d409108c..7c944f886 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/Skywars.java @@ -25,6 +25,7 @@ import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.core.explosion.ExplosionEvent; +import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.loot.ChestLoot; import mineplex.core.loot.RandomItem; import mineplex.core.updater.UpdateType; @@ -1359,4 +1360,13 @@ public class Skywars extends SoloGame } } + + @Override + public double GetKillsGems(Player killer, Player killed, boolean assist) + { + if (assist) + return 3; + else + return 12; + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java index 537b14d44..06afa0711 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java @@ -30,7 +30,7 @@ public class TNTGenerator private Location _loc; private long _time; - private long _timeDelay = 15000; + private long _timeDelay = 25000; private Item _ent; public TNTGenerator(Skywars host, Location loc) @@ -119,7 +119,7 @@ public class TNTGenerator ItemStackFactory.Instance.CreateStack( Material.TNT, (byte) 0, - 1, + 2, F.item(C.cYellow + C.Bold + "Left Click - Far " + C.cWhite + " / " + C.cYellow + C.Bold + " Right Click - Short"))); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/survivalgames/SurvivalGames.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/survivalgames/SurvivalGames.java index 520d558c0..71d2e3f5c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/survivalgames/SurvivalGames.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/survivalgames/SurvivalGames.java @@ -89,11 +89,13 @@ import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.visibility.VisibilityManager; +import mineplex.minecraft.game.core.combat.CombatComponent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; +import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.SoloGame; import nautilus.game.arcade.game.games.survivalgames.kit.*; @@ -1540,7 +1542,7 @@ public class SurvivalGames extends SoloGame } @EventHandler - public void PlayerKillAward(CombatDeathEvent event) + public void PlayerKill(CombatDeathEvent event) { if (!(event.GetEvent().getEntity() instanceof Player)) return; @@ -1553,18 +1555,47 @@ public class SurvivalGames extends SoloGame .build(); for (int i = 0; i < 3; i++) UtilFirework.launchFirework(player.getLocation(), effect, null, 3); + } + + @EventHandler + public void killLevelReward(CombatDeathEvent event) + { + Game game = Manager.GetGame(); + if (game == null) return; - if (event.GetLog().GetKiller() == null) + if (!(event.GetEvent().getEntity() instanceof Player)) return; - Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName()); - if (killer == null) - return; + Player killed = (Player)event.GetEvent().getEntity(); - if (killer.equals(player)) - return; + if (event.GetLog().GetKiller() != null) + { + Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName()); - killer.giveExpLevels(1); + if (killer != null && !killer.equals(killed)) + { + //Kill + killer.giveExpLevels(2); + + killer.playSound(killer.getLocation(), Sound.LEVEL_UP, 1f, 1f); + } + } + + for (CombatComponent log : event.GetLog().GetAttackers()) + { + if (event.GetLog().GetKiller() != null && log.equals(event.GetLog().GetKiller())) + continue; + + Player assist = UtilPlayer.searchExact(log.GetName()); + + //Assist + if (assist != null) + { + assist.giveExpLevels(1); + assist.playSound(assist.getLocation(), Sound.ORB_PICKUP, 1f, 1f); + } + + } } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java index e914a77c2..401309e95 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java @@ -8,6 +8,7 @@ import java.util.Iterator; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; +import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.timing.TimingManager; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; @@ -161,6 +162,7 @@ public class GameCreationManager implements Listener Manager.getCosmeticManager().setHideParticles(false); Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.CustomWeaponName); Manager.GetChat().setThreeSecondDelay(true); + ItemStackFactory.Instance.SetUseCustomNames(false); HashMap pastTeams = null;