mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-09 05:44:40 +00:00
Merge branch 'v26'
This commit is contained in:
@@ -51,6 +51,13 @@ export class GameStartingModal extends LitElement {
|
||||
}
|
||||
|
||||
.modal p {
|
||||
margin: 2px 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.modal .loading {
|
||||
font-size: 16px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
padding: 10px;
|
||||
@@ -88,16 +95,38 @@ export class GameStartingModal extends LitElement {
|
||||
.copyright {
|
||||
font-size: 32px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
font-size: 20px;
|
||||
color: #4a9eff;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.modal a:hover {
|
||||
color: #6bb0ff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
`;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="modal ${this.isVisible ? "visible" : ""}">
|
||||
<div class="copyright">© OpenFront</div>
|
||||
<h5>${translateText("game_starting_modal.code_license")}</h5>
|
||||
<p>${translateText("game_starting_modal.title")}</p>
|
||||
<a
|
||||
href="https://github.com/openfrontio/OpenFrontIO/blob/main/CREDITS.md"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>${translateText("game_starting_modal.credits")}</a
|
||||
>
|
||||
<p>${translateText("game_starting_modal.code_license")}</p>
|
||||
<p class="loading">${translateText("game_starting_modal.title")}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ export class DefaultConfig implements Config {
|
||||
trainSpawnRate(numPlayerFactories: number): number {
|
||||
// hyperbolic decay, midpoint at 10 factories
|
||||
// expected number of trains = numPlayerFactories / trainSpawnRate(numPlayerFactories)
|
||||
return (numPlayerFactories + 10) * 20;
|
||||
return (numPlayerFactories + 10) * 16;
|
||||
}
|
||||
trainGold(rel: "self" | "team" | "ally" | "other"): Gold {
|
||||
switch (rel) {
|
||||
@@ -378,7 +378,8 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
|
||||
tradeShipGold(dist: number, numPorts: number): Gold {
|
||||
const baseGold = Math.floor(100_000 + 100 * dist);
|
||||
// Smooth anti-cheese formula: base reward scales with distance using rational function, heavily penalizing short trades while converging to original rewards at long distances
|
||||
const baseGold = Math.floor(100_000 * (dist / (dist + 50)) + 100 * dist);
|
||||
const numPortBonus = numPorts - 1;
|
||||
// Hyperbolic decay, midpoint at 5 ports, 3x bonus max.
|
||||
const bonus = 1 + 2 * (numPortBonus / (numPortBonus + 5));
|
||||
|
||||
Reference in New Issue
Block a user