Apply small changes to Zombie Infection

This commit is contained in:
Thanos Paravantis 2016-06-25 11:56:55 +03:00
parent 4e9ea23db8
commit bc229c44aa
2 changed files with 9 additions and 4 deletions

View File

@ -123,7 +123,7 @@ public abstract class Challenge implements Listener
Data.resetCompletedAndLost();
Settings.setStartTime(System.currentTimeMillis());
Settings.setMaxCompletedCount((int) Math.ceil(getPlayersAlive().size() / 2D));
Settings.setMaxCompletedCount((int) Math.ceil(getPlayersAlive().size() / 2));
if (Settings.isInventoryLocked())
{

View File

@ -147,7 +147,7 @@ public class ChallengeZombieInfection extends Challenge
{
_zombie.getEntity().teleport(getCenter());
}
else if (UtilMath.r(15) == 0)
else if (UtilMath.r(20) == 0)
{
freeze(UtilMath.r(2) + 1 * 1000);
}
@ -160,9 +160,14 @@ public class ChallengeZombieInfection extends Challenge
{
increaseZombieSpeed();
if (_zombie.getLocation().distance(_zombie.getTarget().getLocation()) <= 2.0)
Player target = _zombie.getTarget();
if (target != null)
{
damage(_zombie.getTarget());
if (UtilMath.offset2d(_zombie.getEntity(), target) <= 2)
{
damage(target);
}
}
}
}