QA testing changes

This commit is contained in:
Sam 2017-10-29 00:49:55 +01:00 committed by Alexander Meech
parent 58b48f2a5d
commit 1408e60d7a
3 changed files with 15 additions and 7 deletions

View File

@ -12,7 +12,7 @@ import nautilus.game.arcade.stats.StatTracker;
public class GetGoodStatTracker extends StatTracker<Game>
{
private static final int MIN_FALL_DISTANCE = 24;
private static final int MIN_FALL_DISTANCE = 15;
public GetGoodStatTracker(Game game)
{

View File

@ -203,7 +203,7 @@ public class CakeResourcePage extends ShopPageBase<ArcadeManager, CakeResourceSh
ItemBuilder give = new ItemBuilder(_item.getItemStack());
Material material = give.getType();
if (UtilItem.isWeapon(material) || UtilItem.isTool(material) || UtilItem.isArmor(material))
if (UtilItem.isWeapon(material) || UtilItem.isTool(material) || UtilItem.isArmor(material) || material == Material.SHEARS)
{
give.setUnbreakable(true);
}

View File

@ -117,6 +117,7 @@ public class CapturePoint
// For each team get the team with the non-zero players
GameTeam highest = null;
int highestPlayers = 0;
for (Entry<GameTeam, Integer> entry : playersOnPoint.entrySet())
{
GameTeam team = entry.getKey();
@ -129,6 +130,7 @@ public class CapturePoint
if (highest == null)
{
highest = team;
highestPlayers = players;
}
// This means there are 2 teams on the point
else
@ -140,9 +142,15 @@ public class CapturePoint
// No one at all is on the point
if (highest == null)
{
if (_owner == null)
{
return;
}
// If the owner isn't null, move the point's progress back
highest = _owner;
}
// Players on the point
// Only inform if it has been a while
else if ((_owner == null || !_owner.equals(highest)) && UtilTime.elapsed(_lastInform, MIN_INFORM_TIME))
@ -165,7 +173,7 @@ public class CapturePoint
return;
}
capture(highest);
capture(highest, highestPlayers);
}
private void sendMessage(GameTeam team, String message)
@ -177,7 +185,7 @@ public class CapturePoint
});
}
private void capture(GameTeam team)
private void capture(GameTeam team, int progress)
{
// No player has ever stood on the point
if (_side == null)
@ -189,7 +197,7 @@ public class CapturePoint
if (_side.equals(team))
{
// Increase progress
_progress++;
_progress += progress;
display(team, true);
// Captured
@ -207,7 +215,7 @@ public class CapturePoint
setBeaconColour(null);
_side = team;
// Recursively call this method now that the first (same team) condition will be true
capture(team);
capture(team, progress);
return;
}