mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:50:45 +00:00
remove vintage theme, rebalance
This commit is contained in:
@@ -104,18 +104,18 @@
|
||||
* BUG: fix tile per turn pacing issues DONE 9/9/2024
|
||||
* Improve expansion directions (more uniform) 9/9/2024
|
||||
|
||||
Uncaught Error: Player with id 0fbon not found
|
||||
player https://tunnel.openfront.dev/bundle.js:2
|
||||
init https://tunnel.openfront.dev/bundle.js:2
|
||||
tick https://tunnel.openfront.dev/bundle.js:2
|
||||
tick https://tunnel.openfront.dev/bundle.js:2
|
||||
tick https://tunnel.openfront.dev/bundle.js:2
|
||||
intervalID https://tunnel.openfront.dev/bundle.js:2
|
||||
|
||||
--- v3 Release
|
||||
|
||||
* store username
|
||||
* store cookies
|
||||
* Make boats more intuitive (larger area to click off coast)
|
||||
* give anon unique number after Anon name
|
||||
* make color a hash of name
|
||||
* FakeHumans retaliate when attacked
|
||||
* BUG: when clicking on enemy sometimes boat goes all the way around
|
||||
* names dissappear too much (maybe screen size)
|
||||
* names dissapear on bottom of screen
|
||||
* UI: win condition & popup
|
||||
* UI: boats
|
||||
* UI: current attacks
|
||||
@@ -123,12 +123,9 @@ Uncaught Error: Player with id 0fbon not found
|
||||
* UI: event box
|
||||
* make random waves on ocean, dark spots
|
||||
* Load terrain dataImage in background
|
||||
* BUG: half encircle Antoartica causes capture
|
||||
* BUG: half encircle Antartica causes capture
|
||||
|
||||
--- v4 Release
|
||||
|
||||
* store username
|
||||
* store cookies
|
||||
* BUG: when sending boat to TerraNullius, only takes one tile
|
||||
* REFACTOR: give terranullius an ID, game.player() returns terranullius
|
||||
* REFACTOR: ocean is considered TerraNullius ?
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 501 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 606 KiB |
@@ -69,7 +69,7 @@ export class TerritoryRenderer {
|
||||
}
|
||||
}
|
||||
)
|
||||
bfs(event.boat.tile(), dist(event.boat.tile(), 2)).forEach(t => this.paintCell(t.cell(), this.theme.borderColor(event.boat.owner().id()), 200))
|
||||
bfs(event.boat.tile(), dist(event.boat.tile(), 2)).forEach(t => this.paintCell(t.cell(), this.theme.borderColor(event.boat.owner().id()), 255))
|
||||
bfs(event.boat.tile(), dist(event.boat.tile(), 1)).forEach(t => this.paintCell(t.cell(), this.theme.territoryColor(event.boat.owner().id()), 180))
|
||||
} else {
|
||||
trail.forEach(t => this.paintTerritory(t))
|
||||
@@ -106,7 +106,7 @@ export class TerritoryRenderer {
|
||||
this.paintCell(
|
||||
tile.cell(),
|
||||
this.theme.territoryColor(tile.owner().id()),
|
||||
70
|
||||
110
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,18 +39,18 @@ export class DefaultConfig implements Config {
|
||||
switch (tileToConquer.terrain()) {
|
||||
case TerrainType.Plains:
|
||||
mag = 10
|
||||
// speed = 10
|
||||
speed = 10
|
||||
break
|
||||
case TerrainType.Highland:
|
||||
mag = 30
|
||||
// speed = 20
|
||||
speed = 20
|
||||
break
|
||||
case TerrainType.Mountain:
|
||||
mag = 90
|
||||
// speed = 40
|
||||
speed = 40
|
||||
break
|
||||
}
|
||||
speed = mag
|
||||
// speed = mag
|
||||
|
||||
if (attacker.isPlayer() && defender.isPlayer()) {
|
||||
if (attacker.type() == PlayerType.Bot && defender.type() == PlayerType.FakeHuman) {
|
||||
|
||||
@@ -16,7 +16,7 @@ export const devConfig = new class extends DefaultConfig {
|
||||
}
|
||||
|
||||
numBots(): number {
|
||||
return 400
|
||||
return 500
|
||||
}
|
||||
|
||||
// startTroops(playerInfo: PlayerInfo): number {
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
import {Colord, colord} from "colord";
|
||||
import {PlayerID, Tile} from "../Game";
|
||||
import {Theme} from "./Config";
|
||||
import {simpleHash} from "../Util";
|
||||
|
||||
export const vintageTheme = new class implements Theme {
|
||||
|
||||
private background = colord({r: 150, g: 140, b: 120});
|
||||
private land = colord({r: 195, g: 175, b: 155})
|
||||
private shore = colord({r: 210, g: 190, b: 170}); // Brighter beige for shore
|
||||
|
||||
private water = colord({r: 160, g: 180, b: 200})
|
||||
private shorelineWater = colord({r: 200, g: 200, b: 205}); // Slightly lighter muted blue for shoreline water
|
||||
|
||||
private territoryColors: Colord[] = [
|
||||
// Original colors, adjusted for a more rustic look
|
||||
colord({r: 160, g: 125, b: 120}), // Faded dusty rose
|
||||
colord({r: 125, g: 155, b: 130}), // Muted sage green
|
||||
colord({r: 160, g: 150, b: 120}), // Weathered khaki
|
||||
colord({r: 125, g: 140, b: 155}), // Aged steel blue
|
||||
colord({r: 155, g: 125, b: 150}), // Worn mauve
|
||||
colord({r: 145, g: 155, b: 120}), // Faded olive
|
||||
colord({r: 125, g: 155, b: 155}), // Weathered teal
|
||||
colord({r: 160, g: 145, b: 120}), // Aged tan
|
||||
colord({r: 140, g: 125, b: 155}), // Faded lavender
|
||||
colord({r: 155, g: 155, b: 120}), // Aged mustard
|
||||
|
||||
// Extended palette with a rustic touch
|
||||
colord({r: 170, g: 135, b: 125}), // Rustic terracotta
|
||||
colord({r: 130, g: 170, b: 145}), // Weathered mint
|
||||
colord({r: 170, g: 160, b: 125}), // Antique gold
|
||||
colord({r: 130, g: 150, b: 170}), // Worn denim
|
||||
colord({r: 170, g: 130, b: 160}), // Aged plum
|
||||
colord({r: 155, g: 170, b: 130}), // Faded lime
|
||||
colord({r: 130, g: 170, b: 170}), // Weathered turquoise
|
||||
colord({r: 170, g: 155, b: 130}), // Rustic sand
|
||||
colord({r: 155, g: 130, b: 170}), // Aged periwinkle
|
||||
colord({r: 170, g: 170, b: 130}), // Faded chartreuse
|
||||
colord({r: 145, g: 110, b: 105}), // Rustic burgundy
|
||||
colord({r: 110, g: 145, b: 120}), // Weathered forest green
|
||||
colord({r: 145, g: 135, b: 110}), // Aged olive
|
||||
colord({r: 110, g: 125, b: 145}), // Faded stormy blue
|
||||
colord({r: 145, g: 110, b: 135}), // Worn grape
|
||||
colord({r: 130, g: 145, b: 110}), // Aged avocado
|
||||
colord({r: 110, g: 145, b: 145}), // Weathered cyan
|
||||
colord({r: 145, g: 130, b: 110}), // Rustic camel
|
||||
colord({r: 130, g: 110, b: 145}), // Faded lilac
|
||||
colord({r: 145, g: 145, b: 110}), // Weathered antique gold
|
||||
colord({r: 165, g: 130, b: 120}), // Rustic coral
|
||||
colord({r: 120, g: 165, b: 140}), // Weathered sage
|
||||
colord({r: 165, g: 155, b: 120}), // Aged mustard
|
||||
colord({r: 120, g: 145, b: 165}), // Worn blue-gray
|
||||
colord({r: 165, g: 120, b: 155}), // Faded orchid
|
||||
colord({r: 145, g: 165, b: 120}), // Aged pear
|
||||
colord({r: 120, g: 165, b: 165}), // Weathered aqua
|
||||
colord({r: 165, g: 145, b: 120}), // Rustic taupe
|
||||
colord({r: 145, g: 120, b: 165}), // Worn wisteria
|
||||
colord({r: 165, g: 165, b: 120}), // Weathered antique brass
|
||||
colord({r: 155, g: 120, b: 110}), // Rustic rust
|
||||
colord({r: 110, g: 155, b: 130}), // Aged sea green
|
||||
colord({r: 155, g: 145, b: 110}), // Weathered khaki
|
||||
colord({r: 110, g: 135, b: 155}), // Worn slate
|
||||
colord({r: 155, g: 110, b: 145}), // Faded mauve
|
||||
colord({r: 135, g: 155, b: 110}), // Aged olive drab
|
||||
colord({r: 110, g: 155, b: 155}), // Weathered teal
|
||||
colord({r: 155, g: 135, b: 110}), // Rustic bronze
|
||||
colord({r: 135, g: 110, b: 155}), // Worn amethyst
|
||||
colord({r: 155, g: 155, b: 110}) // Aged chartreuse
|
||||
];
|
||||
|
||||
playerInfoColor(id: PlayerID): Colord {
|
||||
return colord({r: 90, g: 90, b: 90}); // Slightly lighter grey for player info
|
||||
}
|
||||
|
||||
territoryColor(id: PlayerID): Colord {
|
||||
return this.territoryColors[simpleHash(id) % this.territoryColors.length];
|
||||
}
|
||||
|
||||
borderColor(id: PlayerID): Colord {
|
||||
const tc = this.territoryColor(id).rgba;
|
||||
return colord({
|
||||
r: Math.max(tc.r - 25, 0),
|
||||
g: Math.max(tc.g - 25, 0),
|
||||
b: Math.max(tc.b - 25, 0)
|
||||
});
|
||||
}
|
||||
|
||||
terrainColor(tile: Tile): Colord {
|
||||
if (tile.isLand()) {
|
||||
if (tile.isShore()) {
|
||||
return this.shore;
|
||||
}
|
||||
return this.land;
|
||||
} else {
|
||||
const w = this.water.rgba;
|
||||
if (tile.isShorelineWater()) {
|
||||
return this.shorelineWater;
|
||||
}
|
||||
if (tile.magnitude() < 5) {
|
||||
return colord({
|
||||
r: Math.max(w.r + 5 - tile.magnitude() / 2, 0),
|
||||
g: Math.max(w.g + 5 - tile.magnitude() / 2, 0),
|
||||
b: Math.max(w.b + 5 - tile.magnitude() / 2, 0)
|
||||
});
|
||||
}
|
||||
return this.water;
|
||||
}
|
||||
}
|
||||
|
||||
backgroundColor(): Colord {
|
||||
return this.background;
|
||||
}
|
||||
|
||||
font(): string {
|
||||
return "Georgia, serif"; // A more vintage-looking font
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,10 @@ export class AttackExecution implements Execution {
|
||||
private active: boolean = true;
|
||||
private toConquer: PriorityQueue<TileContainer> = new PriorityQueue<TileContainer>((a: TileContainer, b: TileContainer) => {
|
||||
if (a.priority == b.priority) {
|
||||
if (a.tick == b.tick) {
|
||||
return 0
|
||||
// return this.random.nextInt(-1, 1)
|
||||
}
|
||||
return a.tick - b.tick
|
||||
}
|
||||
return a.priority - b.priority
|
||||
|
||||
Reference in New Issue
Block a user