Exponentially decrease speed as boat loses health

- Boat halves in speed after 90% health loss

#story[1291]
main
Connor Taylor-Brown 8 years ago
parent 16da9e009b
commit 1b4b980081

@ -393,7 +393,7 @@ public class MockRace extends RaceState {
boat.getBearing() boat.getBearing()
), boat.getBearing()) ; ), boat.getBearing()) ;
if (vmg.getSpeed() > 0) { if (vmg.getSpeed() > 0) {
boat.setCurrentSpeed(vmg.getSpeed()); boat.setCurrentSpeed(vmg.getSpeed() * Math.pow(boat.getHealth() / 100, 0.3));
} }
} }

Loading…
Cancel
Save