fix nuke bug, make spawn phase longer, show trade ships in overview

This commit is contained in:
Evan
2024-12-22 20:27:49 -08:00
parent 240036a07c
commit 10d70d3327
5 changed files with 12 additions and 3 deletions
+4
View File
@@ -258,9 +258,13 @@
* highlight player spawn DONE 12/21/2024
* make bots less likely to build ships DONE 12/21/2024
* bugix: wait for css to load on front page DONE 12/21/2024
* fix nuke delete error DONE 12/21/2024
* make spawn phase longer DONE 12/22/2024
* show trade ships in overview DONE 12/22/2024
-- v0.13.0 release
* make url allow to join game
* show players joined username in private lobby
* troop density affects attack bonus
* bug: NPCs don't have money
@@ -55,7 +55,7 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
this.player = owner;
this.setVisible(true);
} else if (!tile.isLand()) {
const units = this.game.units(UnitType.Destroyer, UnitType.Battleship)
const units = this.game.units(UnitType.Destroyer, UnitType.Battleship, UnitType.TradeShip)
.filter(u => euclideanDist(worldCoord, u.tile().cell()) < 50)
.sort(distSortUnit(tile));
+1 -1
View File
@@ -28,7 +28,7 @@ export function initRemoteSender(eventBus: EventBus) {
consolex.error = (...args: any[]): void => {
console.error(...args);
eventBus.emit(new SendLogEvent(LogSeverity.Error, args.join(' ')))
// eventBus.emit(new SendLogEvent(LogSeverity.Error, args.join(' ')))
}
}
export class SendLogEvent implements GameEvent {
+1 -1
View File
@@ -157,7 +157,7 @@ export abstract class DefaultConfig implements Config {
return 500
}
numSpawnPhaseTurns(gameType: GameType): number {
return gameType == GameType.Singleplayer ? 100 : 200
return gameType == GameType.Singleplayer ? 100 : 300
}
numBots(): number {
return 400
+5
View File
@@ -58,6 +58,7 @@ export class UnitImpl implements MutableUnit {
setOwner(newOwner: Player): void {
const oldOwner = this._owner
oldOwner._units = oldOwner._units.filter(u => u != this)
this._owner = newOwner as PlayerImpl
this.g.fireUnitUpdateEvent(this, this.tile())
this.g.displayMessage(
@@ -94,4 +95,8 @@ export class UnitImpl implements MutableUnit {
hash(): number {
return this.tile().cell().x + this.tile().cell().y + simpleHash(this.type())
}
toString(): string {
return `Unit:${this._type},owner:${this.owner().name()}`
}
}