mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:50:43 +00:00
better name rendering, game attack balancing
This commit is contained in:
@@ -27,12 +27,13 @@ export function placeName(game: Game, player: Player): [position: Cell, fontSize
|
||||
largestRectangle.width = largestRectangle.width * scalingFactor
|
||||
largestRectangle.height = largestRectangle.height * scalingFactor
|
||||
|
||||
const center = new Cell(
|
||||
let center = new Cell(
|
||||
Math.floor(largestRectangle.x + largestRectangle.width / 2 + boundingBox.min.x),
|
||||
Math.floor(largestRectangle.y + largestRectangle.height / 2 + boundingBox.min.y),
|
||||
)
|
||||
|
||||
const fontSize = calculateFontSize(largestRectangle, player.name());
|
||||
center = new Cell(center.x, center.y - fontSize / 3)
|
||||
|
||||
return [center, fontSize]
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ export class DefaultConfig implements Config {
|
||||
mag = 1
|
||||
break
|
||||
case TerrainType.Highland:
|
||||
mag = 20
|
||||
mag = 15
|
||||
break
|
||||
case TerrainType.Mountain:
|
||||
mag = 100
|
||||
mag = 50
|
||||
break
|
||||
}
|
||||
if (defender.isPlayer()) {
|
||||
|
||||
Reference in New Issue
Block a user