Fixes a bug preventing the REF from surrendering. The bug was triggered when having non-military unit(s) in Europe and all land military units defeated. The fix is simply removing the check (that is really not needed).

This commit is contained in:
Stian Grenborgen 2023-05-11 16:28:24 +02:00
parent 23da6fe46b
commit c4101225fa
1 changed files with 0 additions and 5 deletions

View File

@ -591,11 +591,6 @@ public class ServerPlayer extends Player implements TurnTaker {
}
}
// Do not surrender until at least presenceFactor of the land
// army has arrived on the map
final double presenceFactor = 2.0/3.0; // FIXME: magic number
if (landOnMap < presenceFactor * land) return false;
// The REF is arrogant and overestimates its strength by a fudge factor
final double refLandPower = 1.5 * calculateStrength(false);
// Do not surrender if there is a rebel whose land army seems weaker