Achievement fixes, minor challenge changes
- Fishing Day was marked as deprecated. - Surf Up will no longer track waves in which players were killed. - Make Bouncing Shadow not count players that lost. - Tag Master will now select alive players only. - Removed debug messages.
This commit is contained in:
parent
ad32f4e2f1
commit
dab3e09837
@ -307,6 +307,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
*
|
||||
* Cloud Fall
|
||||
* Dogs Vs Cats
|
||||
* Fishing Day
|
||||
* Navigation Maze
|
||||
* Volley Pig
|
||||
* Zombie Infection
|
||||
|
@ -55,7 +55,7 @@ public class ChallengeFallingBlocks extends Challenge implements NumberTracker
|
||||
|
||||
private static final int PLAYER_CAMP_MAX_HEIGHT = 3;
|
||||
private static final byte ADDITIONAL_BLOCK_DATA = 2;
|
||||
private static final float BLOCK_HITBOX_GROW = 0.7F;
|
||||
private static final float BLOCK_HITBOX_GROW = 0.6F;
|
||||
|
||||
private static final Material[] MATERIALS = {
|
||||
Material.GRASS,
|
||||
@ -234,12 +234,7 @@ public class ChallengeFallingBlocks extends Challenge implements NumberTracker
|
||||
if (!isChallengeValid())
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (_waveTracker.containsKey(player))
|
||||
{
|
||||
_waveTracker.remove(player);
|
||||
}
|
||||
_waveTracker.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
private void initializeWaveTracker()
|
||||
|
@ -43,6 +43,8 @@ import nautilus.game.arcade.game.games.mineware.challenge.ChallengeType;
|
||||
|
||||
/**
|
||||
* A challenge based on fishing.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ChallengeFishingDay extends Challenge
|
||||
|
@ -62,7 +62,7 @@ public class ChallengeWaveCrush extends Challenge implements NumberTracker
|
||||
ChallengeType.LastStanding,
|
||||
"Wave Crush",
|
||||
"Waves of blocks are coming towards you!",
|
||||
"Avoid getting him by them.");
|
||||
"Avoid getting hit by them.");
|
||||
|
||||
Settings.setUseMapHeight();
|
||||
}
|
||||
@ -119,11 +119,7 @@ public class ChallengeWaveCrush extends Challenge implements NumberTracker
|
||||
{
|
||||
_modifiedNextWaveDelay = NEXT_WAVE_DELAY;
|
||||
|
||||
for (Player player : getPlayersAlive())
|
||||
{
|
||||
_survivedWaves.put(player, 0);
|
||||
}
|
||||
|
||||
initializeWaveTracker();
|
||||
startWavesTask();
|
||||
}
|
||||
|
||||
@ -143,12 +139,7 @@ public class ChallengeWaveCrush extends Challenge implements NumberTracker
|
||||
if (!isChallengeValid())
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (_survivedWaves.containsKey(player))
|
||||
{
|
||||
_survivedWaves.remove(player);
|
||||
}
|
||||
_survivedWaves.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -161,6 +152,7 @@ public class ChallengeWaveCrush extends Challenge implements NumberTracker
|
||||
if (isPlayerValid(player))
|
||||
{
|
||||
Host.Manager.GetDamage().NewDamageEvent(target, null, null, DamageCause.PROJECTILE, player.getHealth(), false, false, false, "Falling Block", "Wave Crush");
|
||||
subtractWaveCount(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -179,6 +171,23 @@ public class ChallengeWaveCrush extends Challenge implements NumberTracker
|
||||
return COLORS[_colorIndex];
|
||||
}
|
||||
|
||||
private void initializeWaveTracker()
|
||||
{
|
||||
for (Player player : getPlayersAlive())
|
||||
{
|
||||
_survivedWaves.put(player, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void subtractWaveCount(Player player)
|
||||
{
|
||||
if (Data.isLost(player) && _survivedWaves.get(player) > 0)
|
||||
{
|
||||
System.out.println("Subtracting from " + player.getName());
|
||||
_survivedWaves.put(player, _survivedWaves.get(player) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void startWavesTask()
|
||||
{
|
||||
new BukkitRunnable()
|
||||
|
@ -30,9 +30,8 @@ public class BouncingShadowTracker extends ChallengeStatTracker
|
||||
|
||||
for (Player player : getGame().GetPlayers(true))
|
||||
{
|
||||
if (bouncingBlock.hasData(player) && bouncingBlock.getData().isDone(player))
|
||||
if (bouncingBlock.hasData(player) && bouncingBlock.getData().isCompleted(player))
|
||||
{
|
||||
System.out.println("Bouncing Shadow: " + player.getName());
|
||||
addStat(player, "BouncingShadow", 1, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class DragonKingTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Dragon King: " + player.getName());
|
||||
addStat(player, "DragonKing", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class EliteArcherTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Elite Archer: " + player.getName());
|
||||
addStat(player, "EliteArcher", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class MilkManTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Milk Man: " + player.getName());
|
||||
addStat(player, "MilkMan", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class PinataMasterTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Pinata Master: " + player.getName());
|
||||
addStat(player, "PinataMaster", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class PixelNinjaTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Pixel Ninja: " + player.getName());
|
||||
addStat(player, "PixelNinja", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ public class SpeedyBuildersTracker extends ChallengeStatTracker
|
||||
{
|
||||
if (buildRace.hasData(player) && buildRace.getData().isDone(player))
|
||||
{
|
||||
System.out.println("Speedy Builders: " + player.getName());
|
||||
addStat(player, "SpeedyBuilders", 1, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ public class SurfUpTracker extends ChallengeStatTracker
|
||||
|
||||
if (score > 0)
|
||||
{
|
||||
System.out.println("Surf Up: " + player.getName());
|
||||
addStat(player, "SurfUp", score, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -28,11 +28,10 @@ public class TagMasterTracker extends ChallengeStatTracker
|
||||
{
|
||||
ChallengeReverseTag reverseTag = (ChallengeReverseTag) challenge;
|
||||
|
||||
for (Player player : getGame().GetPlayers(false))
|
||||
for (Player player : getGame().GetPlayers(true))
|
||||
{
|
||||
if (reverseTag.hasData(player))
|
||||
{
|
||||
System.out.println("Tag Master: " + player.getName());
|
||||
addStat(player, "TagMaster", 1, false, false);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ public class VeteranTracker extends StatTracker<Game>
|
||||
|
||||
if (winner != null)
|
||||
{
|
||||
System.out.println("Veteran: " + winner.getName());
|
||||
addStat(winner, "Veteran", 1, true, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user