Exponentially decrease speed as boat loses health

- Boat halves in speed after 90% health loss

#story[1291]
This commit is contained in:
Connor Taylor-Brown
2017-09-22 00:49:36 +12:00
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));
} }
} }