mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 17:56:43 +00:00
Increase trade ship spawn rate (#1455)
## Description: During play testing not enough trade ships were spawning in the mid-late game. This increases their spawn rate and max number of ships. ## Please complete the following: - [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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -356,17 +356,14 @@ export class DefaultConfig implements Config {
|
||||
|
||||
// Chance to spawn a trade ship in one second,
|
||||
tradeShipSpawnRate(numTradeShips: number): number {
|
||||
if (numTradeShips <= 20) {
|
||||
if (numTradeShips < 20) {
|
||||
return 5;
|
||||
}
|
||||
if (numTradeShips > this.tradeShipCap()) {
|
||||
return 1_000_000;
|
||||
if (numTradeShips <= 150) {
|
||||
const additional = numTradeShips - 20;
|
||||
return Math.pow(additional, 0.8) + 5;
|
||||
}
|
||||
return numTradeShips - 15;
|
||||
}
|
||||
|
||||
tradeShipCap(): number {
|
||||
return 100;
|
||||
return 1_000_000;
|
||||
}
|
||||
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
|
||||
Reference in New Issue
Block a user