mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 10:21:27 +00:00
added back preferential conquer
This commit is contained in:
@@ -171,24 +171,24 @@ export class AttackExecution implements Execution {
|
||||
if (this.targetCell != null) {
|
||||
dist = manhattanDist(tile.cell(), this.targetCell)
|
||||
}
|
||||
// if (numOwnedByMe > 2) {
|
||||
// numOwnedByMe = 10
|
||||
// }
|
||||
// let mag = 0
|
||||
// switch (tile.terrain()) {
|
||||
// case TerrainType.Plains:
|
||||
// mag = 1
|
||||
// break
|
||||
// case TerrainType.Highland:
|
||||
// mag = 2
|
||||
// break
|
||||
// case TerrainType.Mountain:
|
||||
// mag = 3
|
||||
// break
|
||||
// }
|
||||
if (numOwnedByMe > 2) {
|
||||
numOwnedByMe = 10
|
||||
}
|
||||
let mag = 0
|
||||
switch (tile.terrain()) {
|
||||
case TerrainType.Plains:
|
||||
mag = 1
|
||||
break
|
||||
case TerrainType.Highland:
|
||||
mag = 2
|
||||
break
|
||||
case TerrainType.Mountain:
|
||||
mag = 3
|
||||
break
|
||||
}
|
||||
this.toConquer.enqueue(new TileContainer(
|
||||
neighbor,
|
||||
dist / 100 + this.random.nextInt(0, 2) - numOwnedByMe, // + mag,
|
||||
dist / 100 + this.random.nextInt(0, 2) - numOwnedByMe + mag,
|
||||
this.mg.ticks()
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user