Skip to content

Commit

Permalink
Implemented RA aircraft.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwatsonforster committed Sep 25, 2023
1 parent 43f44ab commit 07d720e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions airpower/aircraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,20 @@ def _endmove(self):
self._log("total APs = %+.1f with %+.1f carry = %+.1f." % (ap, self._apcarry, ap + self._apcarry))
ap += self._apcarry

# See rule 6.2.
# TODO: rates for RA aircraft.
# See rules 6.2 and 6.6.
initialspeed = self._speed
if ap < 0:
aprate = -2.0
elif initialspeed >= self._m1():
aprate = +3.0
elif self._aircrafttype.hasproperty("RA"):
if initialspeed >= self._m1():
aprate = +2.0
else:
aprate = +1.5
else:
aprate = +2.0
if initialspeed >= self._m1():
aprate = +3.0
else:
aprate = +2.0

# See rule 6.2 and 6.3
if ap < 0:
Expand Down

0 comments on commit 07d720e

Please sign in to comment.