patsonluk / airline

Apache License 2.0
109 stars 71 forks source link

Airplane maintenance calculation doesn't seem right #553

Closed BWBama85 closed 1 year ago

BWBama85 commented 1 year ago

This:

BASE_MAINTENANCE_FACTOR + ownershipInfo.families.size * PER_FAMILY_MAINTENANCE_FACTOR + ownershipInfo.models.size * PER_MODEL_MAINTENANCE_FACTOR

doesn't match up with what is listed in the game as the calculation used:

Airplane maintenance cost is multiplied by this factor. Maintenance factor = 0.4 + 0.1 * Airplane Family # + 0.02 * Airplane Model #

Which one is supposed to be correct?

Furthermore, no matter which one I use I do not get the value associated with my account.

For one of my accounts, my Airplane Family # is 6 and my Airplane Model # is 6. My account value shows 1.12.

Using my numbers, the game code calculation would be:

0.4 + 6 0.1 + 6 0.02

while the calculation displayed in the game to the users would be:

0.4 + 0.1 6 + 0.02 6

Which one is correct and further, why do neither calculate to the value displayed in the Hangar?

patsonluk commented 1 year ago

Both calculations are the same and give 1.12? 😅

image