added back preferential conquer

This commit is contained in:
evanpelle
2024-09-20 20:30:36 -07:00
parent 61c2077007
commit 287d30513b
+16 -16
View File
@@ -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()
))
}