malkarma -> How decimals work when refiting units (12/11/2020 4:47:31 AM)
|
Some technical question to Alvaro. When refiting units, how the decimal works? In order to elaborate, lets say that an unit have a repair cost of 4.3 per strength point. So... 1)If I repair 1 str point, I will pay: 1a) 4.3*1=4.3(rounded to 4)PP 1b) 4.3(rounded to 4)*1= 4 PP 2)If I repair 2 str points, I will pay: 2a) 4.3(rounded to 4)*2 = 8 PP 2b) 4.3*2= 8.6(rounded to 8) PP 2c) 4.3*2= 8.6(rounded to 9) PP 3) If I repair 3 points, I will pay: But if the cost of repair a strength point of an unit isn 4.6 PP, then... 4) If I repair 1 str point I will pay: 4a) 4.6*1 =4.6 (rounded to 5) PP 4b) 4.6*1=4.6 (rounded to 4) PP 4c) 4.6 (rounded to 4)*1 = 4 PP 5) If I repair 2 str points I will pay: 5a) 4.6 (rounded to 4)*2= 8 PP 5b) 4.6*2 = 9.2 (rounded to 9) PP 5c) 4.6 (rounded to 5)*2=10 PP 6) If I repair 3 str points I will pay: 6a) 4.6(rounded to 4)*3= 12 PP 6b) 4.6(rounded to 5)*3= 15 PP 6c) 4.6*3= 13.8 (rounded to 13) PP 6d) 4.6*3= 13.8 (rounded to 14) PP ps: I'm aware that this can be one of the nerdiest questions that you have received, but I noticed an oddity when repairing the starting Italian depleted corps. So I need to be sure about how the engine calculate the costs before I make the other post (can be a bug or can work as intended)
|
|
|
|