allow reuse of structure discounts (#1513)

## Description:

When someone loses their structures they get their bonus back. Also keep
the structures built, it's nice to still get the bonus after capturing
someone's city.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I have read and accepted the CLA aggreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-07-20 20:28:03 -07:00
committed by GitHub
parent 0489c63f4b
commit 98420ccf97
2 changed files with 37 additions and 72 deletions
+1 -2
View File
@@ -7,7 +7,6 @@ import {
PlayerUpdate,
UnitUpdate,
} from "./GameUpdates";
import { PlayerView } from "./GameView";
import { RailNetwork } from "./RailNetwork";
import { Stats } from "./Stats";
@@ -131,7 +130,7 @@ export enum GameMode {
}
export interface UnitInfo {
cost: (player: Player | PlayerView) => Gold;
cost: (player: Player) => Gold;
// Determines if its owner changes when its tile is conquered.
territoryBound: boolean;
maxHealth?: number;