From e3f678d71d4f1c093e3ac2c98fcca488ebff1f7b Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 27 May 2017 00:56:38 +0100 Subject: [PATCH 1/3] Bugs --- .../mineplex/core/achievement/Achievement.java | 2 +- .../arcade/game/games/alieninvasion/Alien.java | 2 +- .../game/games/alieninvasion/AlienInvasion.java | 16 +++++++++++++++- .../games/alieninvasion/PhaserProjectile.java | 8 +++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index 46a50a3e4..3a08d170b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -66,7 +66,7 @@ public enum Achievement GLOBAL_ALIEN_INVASION("2017 Alien Hub Defender", 4000, new String[]{"Global.Alien Invasion 2017"}, - new String[]{"Kill 50 Aliens in the Lobby,", + new String[]{"Kill 300 Aliens in the Lobby,", "during the Alien Invasion event"}, new int[]{300}, AchievementCategory.HOLIDAY), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/Alien.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/Alien.java index a4847c4eb..ffe7e847f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/Alien.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/Alien.java @@ -42,7 +42,7 @@ public class Alien _stand.setPassenger(_skeleton); _stand.setRemoveWhenFarAway(false); - _skeleton.setMaxHealth(4); + _skeleton.setMaxHealth(3); _skeleton.setRemoveWhenFarAway(false); EntityEquipment equipment = _skeleton.getEquipment(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java index 0e3db481e..f2ce8350c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/AlienInvasion.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.Set; +import nautilus.game.arcade.events.PlayerKitGiveEvent; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; @@ -20,6 +21,8 @@ import org.bukkit.event.entity.EntitySpawnEvent; import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scoreboard.Team; @@ -201,7 +204,6 @@ public class AlienInvasion extends SoloGame for (Player player : GetPlayers(true)) { - Manager.GetCondition().Factory().Invisible(GetName(), player, null, Integer.MAX_VALUE, 0, false, false, false); _score.add(new DragonScore(player, 0)); } @@ -222,6 +224,11 @@ public class AlienInvasion extends SoloGame _lastBeam = System.currentTimeMillis(); _nextBeam = 10000; + for (Player player : GetPlayers(true)) + { + player.sendMessage(F.main("Game", C.cYellow + "Double Tab Space to use your double jump!")); + } + ItemStack glass = new ItemStack(Material.GLASS); CreatureAllowOverride = true; @@ -240,6 +247,12 @@ public class AlienInvasion extends SoloGame CreatureAllowOverride = false; } + @EventHandler + public void invisibility(PlayerKitGiveEvent event) + { + Manager.GetCondition().Factory().Invisible(GetName(), event.getPlayer(), event.getPlayer(), 40, 0, false, false, false); + } + @EventHandler public void updateAliens(UpdateEvent event) { @@ -433,6 +446,7 @@ public class AlienInvasion extends SoloGame for (DragonScore score1 : _score) { + AddGems(score1.Player, score1.Score, "Map Progress", false, false); players.add(score1.Player); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java index 6190fc95e..d9ed703b8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java @@ -1,5 +1,7 @@ package nautilus.game.arcade.game.games.alieninvasion; +import mineplex.core.common.currency.GlobalCurrency; +import mineplex.core.common.util.F; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle.ParticleType; @@ -22,6 +24,8 @@ import org.bukkit.util.Vector; public class PhaserProjectile implements Listener { + private static final int SHARDS_PER_HIT = 15; + private ArcadeManager _manager; private Projectile _projectile; @@ -60,13 +64,15 @@ public class PhaserProjectile implements Listener return; } + _manager.GetDonation().rewardCurrencyUntilSuccess(GlobalCurrency.TREASURE_SHARD, damager, "Alien Hit", SHARDS_PER_HIT); damager.playSound(damager.getLocation(), Sound.CHICKEN_EGG_POP, 1, 0.7F); + damager.sendMessage(F.main("Game", "Hit an alien. +" + F.currency(GlobalCurrency.TREASURE_SHARD, SHARDS_PER_HIT) + ".")); } event.SetCancelled("Blaster Snowball"); UtilParticle.PlayParticle(ParticleType.CLOUD, projectile.getLocation(), 0.5F, 0.5F, 0.5F, 0.05F, 5, ViewDist.NORMAL); - _manager.GetDamage().NewDamageEvent(damagee, damager, projectile, DamageCause.CUSTOM, 4, false, true, true, UtilEnt.getName(damager), "Blaster"); + _manager.GetDamage().NewDamageEvent(damagee, damager, projectile, DamageCause.CUSTOM, 3, false, true, true, UtilEnt.getName(damager), "Blaster"); UtilServer.Unregister(this); } From 4d4988577e1c11c731e0435745079a37ac493140 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 27 May 2017 01:01:16 +0100 Subject: [PATCH 2/3] Use a more sensible method of awarding shards --- .../arcade/game/games/alieninvasion/PhaserProjectile.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java index d9ed703b8..eee602a08 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/alieninvasion/PhaserProjectile.java @@ -1,7 +1,5 @@ package nautilus.game.arcade.game.games.alieninvasion; -import mineplex.core.common.currency.GlobalCurrency; -import mineplex.core.common.util.F; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle.ParticleType; @@ -64,9 +62,8 @@ public class PhaserProjectile implements Listener return; } - _manager.GetDonation().rewardCurrencyUntilSuccess(GlobalCurrency.TREASURE_SHARD, damager, "Alien Hit", SHARDS_PER_HIT); + _manager.GetGame().AddGems(damager, SHARDS_PER_HIT, "Aliens Hit", false, true); damager.playSound(damager.getLocation(), Sound.CHICKEN_EGG_POP, 1, 0.7F); - damager.sendMessage(F.main("Game", "Hit an alien. +" + F.currency(GlobalCurrency.TREASURE_SHARD, SHARDS_PER_HIT) + ".")); } event.SetCancelled("Blaster Snowball"); From 27d92335666fce6450477107b3c35f034c945d72 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 27 May 2017 01:05:02 +0100 Subject: [PATCH 3/3] While we're at it, change the easter egg achievement requirement --- .../src/mineplex/core/achievement/Achievement.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index 3a08d170b..e9945effd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -59,9 +59,9 @@ public enum Achievement GLOBAL_EGG_HUNTER_2017("2017 Egg Hunter", 4000, new String[]{"Global.Easter Eggs 2017"}, - new String[]{"Find 200 Easter Egg Baskets,", + new String[]{"Find 35 Easter Egg Baskets,", "during Easter 2017"}, - new int[]{200}, + new int[]{35}, AchievementCategory.HOLIDAY), GLOBAL_ALIEN_INVASION("2017 Alien Hub Defender", 4000,