mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 19:46:43 +00:00
599342995c
Description: There is a boating exploit where players could repeatedly send and retreat boats to effectively increase troop regeneration and maintain almost double the max troop cap. This PR fixes #2388. Summary This pr adds a troop penalty to the boat retreats in src/core/execution/TransportShipExecution.ts of 25 percent (currently the same as land attacks, but may require fine tuning). this prevents, to some degree, the ability to stockpile large amounts of troops above your max cap. Testing I tested the change locally and confirmed that the troop penalty is applied at the correct times and under the correct conditions, i.e. it is only applied on successful retreat (applying on reteat initiation may be confusing if you are told you have lost troops if the transport ship never arrives anyway). The boating exploit is far less effective with this fix in place. Notes - This is a exploit and does not introduce any new features. - Existing game behavior outside the retreat penalty remains unchanged. - The attack message is the same as the land attack, so the translation should already be present. Checklist - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced --------- Co-authored-by: Evan <evanpelle@gmail.com>