Apply minor changes to block lobbers challenge
This commit is contained in:
parent
e45134f8d5
commit
d1f94bcba5
@ -187,13 +187,12 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
C.cWhite + C.Bold + "GO!");
|
||||
|
||||
/*
|
||||
* TODO: Changes
|
||||
* Changes
|
||||
* - Refactoring
|
||||
* - Improve Zombie Infection
|
||||
* - Improve Scoreboard
|
||||
* - Separate spawn functionality
|
||||
*
|
||||
* TODO: Bugs
|
||||
* Bugs
|
||||
* - Chicken attack triggering on game end (eg. 3 players killed at once)
|
||||
* - Impossible maze on Navigation Maze
|
||||
* - Some players spawn into the void on Lava Run
|
||||
@ -204,9 +203,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
* - 918 null pointer exception
|
||||
* - Array index out of bounds during challenge rotation
|
||||
* - Achievement for not getting hit in king of the ladder is impossible in public games
|
||||
* - Mine the diamond game needs more diamonds
|
||||
* - Players sometimes gain a life when dying (not confirmed)
|
||||
* - Treasure digger map breaking (few pieces of sand spawned in, everyone went in void)
|
||||
* - Block lobbers needs a slightly bigger platform
|
||||
* - // Spectators being teleported over and over to the same location in certain games (no knockback aura around the game area)
|
||||
* - No suitable challenge was found ends the game, does not give exp
|
||||
@ -218,6 +215,9 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
* - No TNT knockback on Deadly TNT
|
||||
* - Obsidian not spawning on Lava Run
|
||||
* - Fishing day lives issue
|
||||
*
|
||||
* Other
|
||||
* - Mine the diamond game needs more diamonds
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@ -721,7 +721,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
_settings.setChallengeStarted(true);
|
||||
|
||||
_challenge.start();
|
||||
|
||||
|
||||
_settings.markMessagesAsSent(false);
|
||||
}
|
||||
else if (!_settings.areMessagesBeingSent())
|
||||
|
@ -36,7 +36,9 @@ import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||
*/
|
||||
public class ChallengeBlockLobbers extends Challenge
|
||||
{
|
||||
private List<Material> _types = new ArrayList<>(Arrays.asList(
|
||||
private List<Material> _throwTypes = new ArrayList<>(Arrays.asList(
|
||||
Material.STONE,
|
||||
Material.COBBLESTONE,
|
||||
Material.GRASS,
|
||||
Material.DIRT,
|
||||
Material.SPONGE,
|
||||
@ -58,7 +60,7 @@ public class ChallengeBlockLobbers extends Challenge
|
||||
{
|
||||
ArrayList<Location> spawns = new ArrayList<Location>();
|
||||
|
||||
for (Location location : circle(getCenter(), 8, 1, false, false, 0))
|
||||
for (Location location : circle(getCenter(), getArenaSize(), 1, false, false, 0))
|
||||
{
|
||||
spawns.add(location.add(0.5, 1.1, 0.5));
|
||||
}
|
||||
@ -70,7 +72,7 @@ public class ChallengeBlockLobbers extends Challenge
|
||||
@Override
|
||||
public void createMap()
|
||||
{
|
||||
for (Location location : circle(getCenter(), 11, 1, false, false, 0))
|
||||
for (Location location : circle(getCenter(), getArenaSize(11), 1, false, false, 0))
|
||||
{
|
||||
Block block = location.getBlock();
|
||||
block.setType(Material.WOOL);
|
||||
@ -98,7 +100,7 @@ public class ChallengeBlockLobbers extends Challenge
|
||||
|
||||
for (Player player : getPlayersAlive())
|
||||
{
|
||||
Material material = UtilMath.randomElement(_types);
|
||||
Material material = UtilMath.randomElement(_throwTypes);
|
||||
|
||||
if (Data.isDone(player))
|
||||
continue;
|
||||
@ -140,15 +142,16 @@ public class ChallengeBlockLobbers extends Challenge
|
||||
|
||||
switchToAvailableSlot(player);
|
||||
|
||||
if (!_types.contains(player.getItemInHand().getType()))
|
||||
Material material = player.getItemInHand().getType();
|
||||
|
||||
if (!_throwTypes.contains(material))
|
||||
return;
|
||||
|
||||
FallingBlock falling = player.getWorld().spawnFallingBlock(player.getLocation().clone().add(0, .4, 0), player.getItemInHand().getType(), (byte) 0);
|
||||
FallingBlock falling = player.getWorld().spawnFallingBlock(player.getLocation().add(0, 0.4, 0), material, (byte) 0);
|
||||
UtilAction.velocity(falling, player.getLocation().getDirection(), 1.5, false, 0.0, 0.3, 10.0, true);
|
||||
Host.Manager.GetProjectile().AddThrow(falling, player, Host, -1, true, false, true, true, 0.2f);
|
||||
|
||||
UtilInv.remove(player, player.getItemInHand().getType(), (byte) 0, 1);
|
||||
|
||||
UtilAction.velocity(falling, event.getPlayer().getLocation().getDirection(), 1.5, false, 0.0, 0.3, 10.0, true);
|
||||
Host.Manager.GetProjectile().AddThrow(falling, event.getPlayer(), Host, -1, true, false, true, true, 0.2f);
|
||||
UtilInv.remove(player, material, (byte) 0, 1);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ -178,7 +181,7 @@ public class ChallengeBlockLobbers extends Challenge
|
||||
if (!isChallengeValid())
|
||||
return;
|
||||
|
||||
if (_types.contains(event.getEntity().getItemStack().getType()))
|
||||
if (_throwTypes.contains(event.getEntity().getItemStack().getType()))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user