Added error flag set and increased cost

This commit is contained in:
Jaggernaut555 2017-12-31 18:26:47 -08:00
parent b9d66dc30f
commit 95f4af1683

View File

@ -70,9 +70,12 @@ public class CubotLeg extends CpuHardware implements JSONSerialisable {
} }
} else if (a == LEGS_JUMP) { } else if (a == LEGS_JUMP) {
// jump up to 3 spaces, each space costs 200 // jump up to 3 spaces, each space costs 200
if (b < 4 && cubot.getMaxEnergy() >= b * 200) { if (b < 4 && cubot.getMaxEnergy() >= b * 300) {
cubot.setJumpDistance(b); cubot.setJumpDistance(b);
cubot.setCurrentAction(Action.JUMPING); cubot.setCurrentAction(Action.JUMPING);
status.setErrorFlag(false);
} else {
status.setErrorFlag(true);
} }
} }
} }