mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 17:35:12 +00:00
ports increase in price, NPC attack more frequently, tradeship destroyed if dst port destroyed or captured
This commit is contained in:
@@ -12,43 +12,43 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
tradeShipGold(src: Unit, dst: Unit): Gold {
|
||||
const dist = manhattanDist(src.tile().cell(), dst.tile().cell())
|
||||
return 10000 + 5 * dist
|
||||
return 10000 + 50 * dist
|
||||
}
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
switch (type) {
|
||||
case UnitType.TransportShip:
|
||||
return {
|
||||
cost: 0,
|
||||
cost: () => 0,
|
||||
territoryBound: false
|
||||
}
|
||||
case UnitType.Destroyer:
|
||||
return {
|
||||
cost: 250_000,
|
||||
cost: () => 250_000,
|
||||
territoryBound: false
|
||||
}
|
||||
case UnitType.Port:
|
||||
return {
|
||||
cost: 250_000,
|
||||
cost: (p: Player) => (p.units(UnitType.Port).length + 1) * 250_000,
|
||||
territoryBound: true
|
||||
}
|
||||
case UnitType.AtomBomb:
|
||||
return {
|
||||
cost: 1_000_000,
|
||||
cost: () => 1_000_000,
|
||||
territoryBound: false
|
||||
}
|
||||
case UnitType.HydrogenBomb:
|
||||
return {
|
||||
cost: 5_000_000,
|
||||
cost: () => 5_000_000,
|
||||
territoryBound: false
|
||||
}
|
||||
case UnitType.TradeShip:
|
||||
return {
|
||||
cost: 0,
|
||||
cost: () => 0,
|
||||
territoryBound: false
|
||||
}
|
||||
case UnitType.MissileSilo:
|
||||
return {
|
||||
cost: 1_000_000,
|
||||
cost: () => 2_500_000,
|
||||
territoryBound: true
|
||||
}
|
||||
default:
|
||||
@@ -173,7 +173,7 @@ export class DefaultConfig implements Config {
|
||||
return 10000
|
||||
}
|
||||
if (playerInfo.playerType == PlayerType.FakeHuman) {
|
||||
return 1000 // start troops * strength * difficulty
|
||||
return 2000 // start troops * strength * difficulty
|
||||
}
|
||||
return 25000
|
||||
}
|
||||
@@ -207,7 +207,7 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
|
||||
goldAdditionRate(player: Player): number {
|
||||
return Math.sqrt(player.workers() * player.numTilesOwned()) / 600
|
||||
return Math.sqrt(player.workers() * player.numTilesOwned()) / 250
|
||||
}
|
||||
|
||||
troopAdjustmentRate(player: Player): number {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { PlayerInfo, UnitInfo, UnitType } from "../game/Game";
|
||||
import { Player, PlayerInfo, UnitInfo, UnitType } from "../game/Game";
|
||||
import { DefaultConfig } from "./DefaultConfig";
|
||||
|
||||
export const devConfig = new class extends DefaultConfig {
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
const info = super.unitInfo(type)
|
||||
info.cost = 0
|
||||
const oldCost = info.cost
|
||||
info.cost = (p: Player) => oldCost(p) / 100
|
||||
return info
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user