BattletechModders / PanicSystem

Simulates mechwarrior panic and automatic ejections
The Unlicense
4 stars 7 forks source link

Improve the percentage calculation #9

Closed LokiAz9 closed 4 years ago

LokiAz9 commented 4 years ago

My original design would ignore the front/back armor if the structure is lower, but it should simply use the minimum of both and still consider it. For example: FA 100% / BA 0% / Struct 50% Old = ignore + 0 + 50 / 2 = 25% New = 50 + 0 + 50 / 3 = 33%

If the FA % is slightly lower than the structure, in the old design you would panic less than if the FA were full. FA 49% / BA 0% / Struct 50% Old = 49 + 0 + 50 / 3 = 33% (very similar result to the new design)