Remove features that contain bugs

This commit is contained in:
Thanos Paravantis 2016-07-11 01:02:19 +03:00
parent 416b978c4f
commit 6a87be13f0
6 changed files with 19 additions and 136 deletions

View File

@ -769,11 +769,11 @@ public enum Achievement
new int[] {3},
AchievementCategory.BAWK_BAWK_BATTLES),
BAWK_BAWK_BATTLES_BOUNCING_SHADOW("Bouncing Shadow", 500,
new String[]{"Bawk Bawk Battles.BouncingShadow"},
new String[]{C.cGray + "Bouncing Block Challenge", "Win 3 entire rounds", "without stepping on red wool"},
new int[] {3},
AchievementCategory.BAWK_BAWK_BATTLES),
// BAWK_BAWK_BATTLES_BOUNCING_SHADOW("Bouncing Shadow", 500,
// new String[]{"Bawk Bawk Battles.BouncingShadow"},
// new String[]{C.cGray + "Bouncing Block Challenge", "Win 3 entire rounds", "without stepping on red wool"},
// new int[] {3},
// AchievementCategory.BAWK_BAWK_BATTLES),
//Bomb Lobbers
BOMB_LOBBERS_WINS("Master Bomber", 1200,

View File

@ -29,7 +29,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerMoveEvent;
@ -42,7 +41,6 @@ import org.bukkit.scheduler.BukkitRunnable;
import com.google.common.collect.Lists;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
@ -80,11 +78,8 @@ import nautilus.game.arcade.game.games.mineware.challenge.ChallengeSettings;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeAnvilDance;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeArrowRampage;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBlockLobbers;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBouncingBlock;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeBuildRace;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeChickenShooting;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeCloudFall;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeColorChange;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDeadlyTnt;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDiamondHunt;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeDogsVersusCats;
@ -97,7 +92,6 @@ import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeLavaRun;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMilkACow;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMinecartDance;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeMiniOneInTheQuiver;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeNavigationMaze;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeOreRun;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengePickASide;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengePunchThePig;
@ -109,13 +103,11 @@ import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeTreasure
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeVolleyPig;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeWaterHorror;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeWaveCrush;
import nautilus.game.arcade.game.games.mineware.challenge.type.ChallengeZombieInfection;
import nautilus.game.arcade.game.games.mineware.effect.ChickenAttack;
import nautilus.game.arcade.game.games.mineware.effect.DeathEffect;
import nautilus.game.arcade.game.games.mineware.effect.DeathEffectData;
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
import nautilus.game.arcade.game.games.mineware.kit.KitBawksFood;
import nautilus.game.arcade.game.games.mineware.tracker.BouncingShadowTracker;
import nautilus.game.arcade.game.games.mineware.tracker.DragonKingTracker;
import nautilus.game.arcade.game.games.mineware.tracker.EliteArcherTracker;
import nautilus.game.arcade.game.games.mineware.tracker.MilkManTracker;
@ -214,11 +206,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
private List<Block> _lastChallengeBlocks;
private long _delay;
private String _restrictCommand = "restrict";
private String _skipCommand = "skip";
private String _markCommand = "mark";
private String _loseCommand = "lose";
private List<String> _countdown = Arrays.asList(
C.cRed + C.Bold + "3",
C.cYellow + C.Bold + "2",
@ -258,7 +245,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
TeleportsDisqualify = false;
GiveClock = false;
// TODO: Temporary
CompassEnabled = false;
CompassGiveItem = false;
CompassGiveItemSpectators = false;
@ -268,7 +254,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
populateChallenges();
registerStatTrackers(
new BouncingShadowTracker(this),
new DragonKingTracker(this),
new EliteArcherTracker(this),
new MilkManTracker(this),
@ -286,11 +271,8 @@ public class BawkBawkBattles extends TeamGame implements IThrown
new ChallengeAnvilDance(this),
new ChallengeArrowRampage(this),
new ChallengeBlockLobbers(this),
new ChallengeBouncingBlock(this),
new ChallengeBuildRace(this),
new ChallengeChickenShooting(this),
new ChallengeCloudFall(this),
new ChallengeColorChange(this),
new ChallengeDeadlyTnt(this),
new ChallengeDiamondHunt(this),
new ChallengeDogsVersusCats(this),
@ -305,7 +287,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
new ChallengeOreRun(this),
new ChallengeMinecartDance(this),
new ChallengeMiniOneInTheQuiver(this),
new ChallengeNavigationMaze(this),
new ChallengePickASide(this),
new ChallengePunchThePig(this),
new ChallengeRedLightGreenLight(this),
@ -314,8 +295,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
new ChallengeSmashOff(this),
new ChallengeTreasureDigger(this),
new ChallengeVolleyPig(this),
new ChallengeWaveCrush(this),
new ChallengeZombieInfection(this));
new ChallengeWaveCrush(this));
}
@Override
@ -374,9 +354,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
setupChallengeSpawnLocations();
_challenge.createMap();
if (_settings.canMarkSpawnLocations())
_challenge.markSpawnLocations();
spawnAndResetPlayers(true);
}
@ -613,9 +590,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
spawnAndResetPlayers(false);
if (_settings.canMarkSpawnLocations())
_challenge.markSpawnLocations();
_delay = System.currentTimeMillis();
_settings.setWaiting(true);
}
@ -1356,90 +1330,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
removeSolidBlockForPlayers();
}
// Debug Only
@EventHandler
public void debugCommands(PlayerCommandPreprocessEvent event)
{
Player player = event.getPlayer();
String message = event.getMessage();
if (Manager.GetClients().hasRank(player, Rank.SNR_MODERATOR))
{
if (message.startsWith("/" + _restrictCommand))
{
String[] pieces = message.split(" ");
if (pieces.length > 1)
{
String challenge = F.combine(pieces, 1, null, false).trim();
if (_list.restrict(challenge))
{
UtilPlayer.message(player, F.main("Game", "Restricted to " + F.elem(challenge) + " challenge."));
}
else
{
UtilPlayer.message(player, F.main("Game", "Could not find any challenge by that name."));
}
}
else
{
UtilPlayer.message(player, F.main("Game", "All challenge restrictions were cleared."));
_list.unrestrict();
}
event.setCancelled(true);
}
else if (message.startsWith("/" + _skipCommand))
{
if (IsLive())
{
endCurrentChallenge();
Announce(C.cAqua + C.Bold + player.getName() + " skipped this challenge.");
}
else
{
UtilPlayer.message(player, F.main("Game", "You cannot skip a challenge if the game is not started."));
}
event.setCancelled(true);
}
else if (message.startsWith("/" + _markCommand))
{
if (_settings.canMarkSpawnLocations())
{
_settings.setMarkSpawnLocations(false);
UtilPlayer.message(player, F.main("Game", "Spawn locations will no longer be marked."));
}
else
{
_settings.setMarkSpawnLocations(true);
UtilPlayer.message(player, F.main("Game", C.cGreen + "Spawn locations will be marked."));
}
event.setCancelled(true);
}
else if (message.startsWith("/" + _loseCommand))
{
if (IsLive() && _challenge != null && IsAlive(player))
{
setLives(player, 0);
_challenge.getData().addLostPlayer(player);
_deathEffect.playDeath(player, player.getLocation());
GetScoreboard().ResetScore(player.getName());
_chickenAttack.start(player);
}
else
{
UtilPlayer.message(player, F.main("Game", "You cannot lose at this time."));
}
event.setCancelled(true);
}
}
}
/*
* Scoreboard
*/

View File

@ -11,9 +11,6 @@ public class BawkBawkBattlesSettings
private boolean _sendingMessages = false;
private boolean _challengeStarted = false;
// Debug
private boolean _markSpawnLocations = false;
public void setCrumbling(boolean flag)
{
_crumbling = flag;
@ -63,14 +60,4 @@ public class BawkBawkBattlesSettings
{
return _challengeStarted;
}
public void setMarkSpawnLocations(boolean flag)
{
_markSpawnLocations = flag;
}
public boolean canMarkSpawnLocations()
{
return _markSpawnLocations;
}
}

View File

@ -143,12 +143,13 @@ public class ChallengeLavaRun extends Challenge
_modifiedDelay += DELAY_BOOST;
}
if (_modifiedDelayMin - DELAY_SUBTRACT > 0)
if (_modifiedDelayMin > 0)
{
_modifiedDelayMin -= DELAY_SUBTRACT;
_modifiedDelay += _modifiedDelayMin;
}
System.out.println("Delay: " + _modifiedDelay);
_disappearingBlocks++;
_shouldMoveObsidian = false;
}

View File

@ -16,6 +16,12 @@ import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
*/
public class ChallengeSmashOff extends Challenge
{
private static final int PLATFORM_SIZE = 4;
private static final double SPAWN_CENTER = 0.5;
private static final int PLATFORM_COLOR_RANGE = 16;
private static final int PLATFORM_ADD_Z = 2;
private static final int PLATFORM_COLOR_LIMIT = 14;
public ChallengeSmashOff(BawkBawkBattles host)
{
super(
@ -38,7 +44,7 @@ public class ChallengeSmashOff extends Challenge
{
for (int pZ = 0; pZ < amount; pZ++)
{
spawns.add(getCenter().add((pX * 4) + 0.5, 1, (pZ * 4) + 0.5));
spawns.add(getCenter().add((pX * PLATFORM_SIZE) + SPAWN_CENTER, 1, (pZ * PLATFORM_SIZE) + SPAWN_CENTER));
}
}
@ -49,15 +55,15 @@ public class ChallengeSmashOff extends Challenge
public void createMap()
{
int amount = (int) Math.ceil(Math.sqrt(Host.getPlayersWithRemainingLives()));
int a = UtilMath.r(16);
int a = UtilMath.r(PLATFORM_COLOR_RANGE);
for (int pX = 0; pX < amount; pX++)
{
for (int pZ = 0; pZ < amount; pZ++)
{
for (int x = pX * 4; x < (pX * 4) + 2; x++)
for (int x = pX * PLATFORM_SIZE; x < (pX * PLATFORM_SIZE) + PLATFORM_ADD_Z; x++)
{
for (int z = pZ * 4; z < (pZ * 4) + 2; z++)
for (int z = pZ * PLATFORM_SIZE; z < (pZ * PLATFORM_SIZE) + PLATFORM_ADD_Z; z++)
{
Block block = getCenter().getBlock().getRelative(x, 0, z);
setBlock(block, Material.STAINED_CLAY, (byte) a);
@ -65,7 +71,7 @@ public class ChallengeSmashOff extends Challenge
}
}
if (++a > 15)
if (++a >= PLATFORM_COLOR_LIMIT)
{
a = 0;
}

View File

@ -7,7 +7,6 @@ import org.bukkit.Location;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.hologram.Hologram;