fix: charge Tinkeroids two QIC for Gaia habitability
This commit is contained in:
parent
405d5b6e7b
commit
717d446a3b
10 changed files with 150 additions and 17 deletions
|
|
@ -113,9 +113,14 @@ text (effect + depiction plan) is kept here. Concretely, each component-type ent
|
||||||
base values → high trust)`. Confidence: **CONFIRMED** (owner-verified 2026-06-25: 2k start + 4/2 power split).
|
base values → high trust)`. Confidence: **CONFIRMED** (owner-verified 2026-06-25: 2k start + 4/2 power split).
|
||||||
- Terraform: 3 steps for the "cost-3" base colors, 1 step for all others; the cost-3 set is
|
- Terraform: 3 steps for the "cost-3" base colors, 1 step for all others; the cost-3 set is
|
||||||
determined at setup via the Moweyds/Tinkeroids Terraforming board (see revised §B5).
|
determined at setup via the Moweyds/Tinkeroids Terraforming board (see revised §B5).
|
||||||
**Gaia planet: a mine costs the normal 1 Q.I.C. — NOT 2** (corrected 2026-06-27; only Darkanians &
|
**Gaia planet: making it habitable costs 2 Q.I.C.s.** Source: `rulebook-v1.0.pdf`,
|
||||||
Space Giants pay the 2-Q.I.C. Gaia surcharge, see §B2/§B4). Source: `RULEBOOK-TEXT p.13` + owner
|
p.13, Appendix I, Tinkeroids: “Making a Gaia planet habitable costs you 2 Q.I.C.s.”
|
||||||
2026-06-27. CONFIRMED.
|
This supersedes the incorrect 2026-06-27 clarification claiming 1 Q.I.C.; that claim
|
||||||
|
contradicted the cited rulebook. A mine replacing your Gaiaformer still pays no habitability cost
|
||||||
|
and is considered accessible (base rules p.11,
|
||||||
|
[official English rulebook](https://www.feuerland-spiele.de/fileadmin/game/Gaia_Project/GAIA_PROJECT_EN_rules_Web.pdf)).
|
||||||
|
Otherwise, range-extension Q.I.C.s are additional to the habitability cost. This is a faction
|
||||||
|
ability, not a blanket surcharge for every faction playing with Lost Fleet.
|
||||||
- Starts with Planetary Institute (not mines), placed in stage 2. Source: p.13. CONFIRMED.
|
- Starts with Planetary Institute (not mines), placed in stage 2. Source: p.13. CONFIRMED.
|
||||||
- 6 Tinkering tiles (3 for rounds 1-3, 3 for 4-6); PI: once/round use current Tinkering tile as action.
|
- 6 Tinkering tiles (3 for rounds 1-3, 3 for 4-6); PI: once/round use current Tinkering tile as action.
|
||||||
Individual tile effects, all confirmed (owner board-read 2026-06-27):
|
Individual tile effects, all confirmed (owner board-read 2026-06-27):
|
||||||
|
|
@ -153,7 +158,7 @@ base values → high trust)`. Confidence: **CONFIRMED** (owner-verified 2026-06-
|
||||||
- Starts with 1 mine (stage 2) AND an Exploration Shuttle already on T F Mars. Terraform: 3 steps for
|
- Starts with 1 mine (stage 2) AND an Exploration Shuttle already on T F Mars. Terraform: 3 steps for
|
||||||
the "cost-3" base colors, 1 step for all others; cost-3 set determined at setup via the Terraforming
|
the "cost-3" base colors, 1 step for all others; cost-3 set determined at setup via the Terraforming
|
||||||
board (see revised §B5). **Gaia planet: a mine costs the normal 1 Q.I.C. — NOT 2** (corrected
|
board (see revised §B5). **Gaia planet: a mine costs the normal 1 Q.I.C. — NOT 2** (corrected
|
||||||
2026-06-27; only Darkanians & Space Giants pay the 2-Q.I.C. Gaia surcharge). Source: p.13 + owner
|
2026-06-27; Tinkeroids, Darkanians & Space Giants pay the 2-Q.I.C. Gaia surcharge). Source: p.13 + owner
|
||||||
2026-06-27. CONFIRMED.
|
2026-06-27. CONFIRMED.
|
||||||
- PI: once/round place a Power Ring (action) on a planet with your building; +2 power value there.
|
- PI: once/round place a Power Ring (action) on a planet with your building; +2 power value there.
|
||||||
6 Power Rings available. Source: p.13. CONFIRMED.
|
6 Power Rings available. Source: p.13. CONFIRMED.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@gaia-project/engine",
|
"name": "@gaia-project/engine",
|
||||||
"version": "4.17.11",
|
"version": "4.17.12",
|
||||||
"description": "Javascript engine for project gaia",
|
"description": "Javascript engine for project gaia",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "index.ts",
|
"types": "index.ts",
|
||||||
|
|
|
||||||
|
|
@ -307,14 +307,14 @@ describe("possibleFederationTokenBuildMine", () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
[Faction.Darkanians, Faction.SpaceGiants].forEach((faction) => {
|
[Faction.Tinkeroids, Faction.Darkanians, Faction.SpaceGiants].forEach((faction) => {
|
||||||
it(`charges ${faction}'s 2-QIC Gaia-forming surcharge (instead of the normal 1 QIC) on Gaia planets, for either token`, () => {
|
it(`charges ${faction}'s 2-QIC Gaia-forming surcharge (instead of the normal 1 QIC) on Gaia planets, for either token`, () => {
|
||||||
const engine = createLostFleetRoundMoveEngine(2, [faction, Faction.Terrans]);
|
const engine = createLostFleetRoundMoveEngine(2, [faction, Faction.Terrans]);
|
||||||
occupyStartingHex(engine, PlayerEnum.Player1);
|
occupyStartingHex(engine, PlayerEnum.Player1);
|
||||||
const player = engine.player(PlayerEnum.Player1);
|
const player = engine.player(PlayerEnum.Player1);
|
||||||
|
|
||||||
// Independent of player.gaiaFormingCost(), so this can't pass merely by mirroring the
|
// Independent of player.gaiaFormingCost(), so this can't pass merely by mirroring the
|
||||||
// implementation: §G5/player.ts hardcode this surcharge at exactly 2 QIC for these 2 factions.
|
// implementation: Lost Fleet rulebook p.13 specifies exactly 2 QIC for these factions.
|
||||||
const gaiaSurcharge = new Reward(2, Resource.Qic);
|
const gaiaSurcharge = new Reward(2, Resource.Qic);
|
||||||
expect(player.gaiaFormingCost()).to.deep.equal(gaiaSurcharge);
|
expect(player.gaiaFormingCost()).to.deep.equal(gaiaSurcharge);
|
||||||
|
|
||||||
|
|
|
||||||
105
engine/src/gaia-mine-cost.spec.ts
Normal file
105
engine/src/gaia-mine-cost.spec.ts
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
import { expect } from "chai";
|
||||||
|
import "mocha";
|
||||||
|
import Engine from "./engine";
|
||||||
|
import { Building, Command, Faction, Phase, Planet, Player as PlayerEnum, Resource } from "./enums";
|
||||||
|
import Reward from "./reward";
|
||||||
|
|
||||||
|
// Synthetic round-move positions: exercise the real command availability and payment path,
|
||||||
|
// without relying on faction setup income or a particular map's planet distribution.
|
||||||
|
function position(faction: Faction, lostFleet: boolean, rangeQic: number, gaiaformer = false) {
|
||||||
|
const engine = new Engine(["init 2 gaia-mine-cost"], { lostFleet });
|
||||||
|
engine.players.forEach((player, index) => {
|
||||||
|
player.faction = index === 0 ? faction : Faction.Xenos;
|
||||||
|
player.loadFaction(null, engine.expansions);
|
||||||
|
player.data.credits = 10;
|
||||||
|
player.data.ores = 10;
|
||||||
|
});
|
||||||
|
const player = engine.players[0];
|
||||||
|
const hexes = [...engine.map.grid.values()].filter((hex) => !hex.hasSpaceship());
|
||||||
|
const start = hexes[0];
|
||||||
|
const target = hexes.find((hex) => engine.map.distance(start, hex) === 3);
|
||||||
|
expect(target, "need a target at distance 3").not.to.equal(undefined);
|
||||||
|
start.data.planet = Planet.Terra;
|
||||||
|
start.data.player = PlayerEnum.Player1;
|
||||||
|
start.data.building = Building.Mine;
|
||||||
|
player.data.occupied.push(start);
|
||||||
|
player.data.buildings[Building.Mine] = 1;
|
||||||
|
player.data.range = rangeQic ? 1 : 3;
|
||||||
|
target.data.planet = Planet.Gaia;
|
||||||
|
if (gaiaformer) {
|
||||||
|
target.data.player = PlayerEnum.Player1;
|
||||||
|
target.data.building = Building.GaiaFormer;
|
||||||
|
player.data.buildings[Building.GaiaFormer] = 1;
|
||||||
|
}
|
||||||
|
engine.phase = Phase.RoundMove;
|
||||||
|
engine.round = 1;
|
||||||
|
engine.turnOrder = [PlayerEnum.Player1, PlayerEnum.Player2];
|
||||||
|
engine.currentPlayer = PlayerEnum.Player1;
|
||||||
|
const offered = () => {
|
||||||
|
engine.clearAvailableCommands();
|
||||||
|
return engine
|
||||||
|
.findAvailableCommand(PlayerEnum.Player1, Command.Build)
|
||||||
|
?.data.buildings.find((build) => build.coordinates === target.toString() && build.building === Building.Mine);
|
||||||
|
};
|
||||||
|
return { engine, player, target, offered };
|
||||||
|
}
|
||||||
|
|
||||||
|
const cases: [Faction, number, Resource][] = [
|
||||||
|
[Faction.Tinkeroids, 2, Resource.Qic],
|
||||||
|
[Faction.Darkanians, 2, Resource.Qic],
|
||||||
|
[Faction.SpaceGiants, 2, Resource.Qic],
|
||||||
|
[Faction.Moweyds, 1, Resource.Qic],
|
||||||
|
[Faction.Terrans, 1, Resource.Qic],
|
||||||
|
[Faction.Gleens, 1, Resource.Ore],
|
||||||
|
];
|
||||||
|
|
||||||
|
describe("Gaia mine habitability costs", () => {
|
||||||
|
for (const [faction, surcharge, resource] of cases) {
|
||||||
|
for (const lostFleet of [false, true]) {
|
||||||
|
for (const rangeQic of [0, 1]) {
|
||||||
|
it(`${faction}: faction-specific cost with Lost Fleet=${lostFleet}, range QIC=${rangeQic}`, () => {
|
||||||
|
const { engine, player, target, offered } = position(faction, lostFleet, rangeQic);
|
||||||
|
const qics = rangeQic + (resource === Resource.Qic ? surcharge : 0);
|
||||||
|
const ores = 1 + (resource === Resource.Ore ? surcharge : 0);
|
||||||
|
player.data.qics = qics;
|
||||||
|
player.data.ores = ores;
|
||||||
|
const build = offered();
|
||||||
|
expect(build).not.to.equal(undefined);
|
||||||
|
expect(
|
||||||
|
Reward.match(Reward.parse(`2c,${ores}o${qics ? `,${qics}q` : ""}`), Reward.parse(build.cost))
|
||||||
|
).to.equal(true);
|
||||||
|
|
||||||
|
if (qics > 0) {
|
||||||
|
player.data.qics = qics - 1;
|
||||||
|
} else {
|
||||||
|
player.data.ores = ores - 1;
|
||||||
|
}
|
||||||
|
expect(offered(), "one resource short must not offer the mine").to.equal(undefined);
|
||||||
|
expect(() => engine.move(`${faction} build m ${target}`)).to.throw();
|
||||||
|
player.data.qics = qics;
|
||||||
|
player.data.ores = ores;
|
||||||
|
offered();
|
||||||
|
engine.move(`${faction} build m ${target}`);
|
||||||
|
expect(target.data.building).to.equal(Building.Mine);
|
||||||
|
expect(player.data.qics).to.equal(0);
|
||||||
|
expect(player.data.ores).to.equal(0);
|
||||||
|
expect(player.data.credits).to.equal(8);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
it(`${faction}: a mine replacing its Gaiaformer waives habitability and range QIC`, () => {
|
||||||
|
const { engine, player, target, offered } = position(faction, true, 1, true);
|
||||||
|
player.data.qics = 0;
|
||||||
|
player.data.ores = 1;
|
||||||
|
const build = offered();
|
||||||
|
expect(build).not.to.equal(undefined);
|
||||||
|
expect(Reward.match(Reward.parse("2c,o"), Reward.parse(build.cost))).to.equal(true);
|
||||||
|
engine.move(`${faction} build m ${target}`);
|
||||||
|
expect(target.data.building).to.equal(Building.Mine);
|
||||||
|
expect(player.data.qics).to.equal(0);
|
||||||
|
expect(player.data.ores).to.equal(0);
|
||||||
|
expect(player.data.buildings[Building.GaiaFormer]).to.equal(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -99,8 +99,8 @@ describe("Player", () => {
|
||||||
expect(Reward.match(Reward.parse("2c,7o"), cost)).to.be.true;
|
expect(Reward.match(Reward.parse("2c,7o"), cost)).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should charge a 2 QIC surcharge (instead of the standard 1) for Darkanians/Space Giants building a mine on a Gaia planet", () => {
|
it("should charge a 2 QIC surcharge (instead of the standard 1) for Tinkeroids/Darkanians/Space Giants building a mine on a Gaia planet", () => {
|
||||||
for (const faction of [Faction.Darkanians, Faction.SpaceGiants]) {
|
for (const faction of [Faction.Tinkeroids, Faction.Darkanians, Faction.SpaceGiants]) {
|
||||||
const player = new Player(Expansion.LostFleet, PlayerEnum.Player1);
|
const player = new Player(Expansion.LostFleet, PlayerEnum.Player1);
|
||||||
|
|
||||||
player.faction = faction;
|
player.faction = faction;
|
||||||
|
|
|
||||||
|
|
@ -1093,9 +1093,13 @@ export default class Player extends EventEmitter {
|
||||||
if (this.faction === Faction.Gleens) {
|
if (this.faction === Faction.Gleens) {
|
||||||
return new Reward(1, Resource.Ore);
|
return new Reward(1, Resource.Ore);
|
||||||
}
|
}
|
||||||
// Lost Fleet: Darkanians & Space Giants pay a 2-Q.I.C. surcharge to build a mine on a Gaia
|
// Lost Fleet rulebook p.13: Tinkeroids, Darkanians and Space Giants pay 2 Q.I.C.s
|
||||||
// planet (Tinkeroids/Moweyds pay the normal 1, unlike the rest of this no-home-planet group).
|
// to make a Gaia planet habitable. Moweyds retain the normal 1-Q.I.C. cost.
|
||||||
if (this.faction === Faction.Darkanians || this.faction === Faction.SpaceGiants) {
|
if (
|
||||||
|
this.faction === Faction.Tinkeroids ||
|
||||||
|
this.faction === Faction.Darkanians ||
|
||||||
|
this.faction === Faction.SpaceGiants
|
||||||
|
) {
|
||||||
return new Reward(2, Resource.Qic);
|
return new Reward(2, Resource.Qic);
|
||||||
}
|
}
|
||||||
return new Reward(1, Resource.Qic);
|
return new Reward(1, Resource.Qic);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@gaia-project/old-ui",
|
"name": "@gaia-project/old-ui",
|
||||||
"version": "1.2.39",
|
"version": "1.2.40",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vite --port 5193",
|
"serve": "vite --port 5193",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@gaia-project/viewer",
|
"name": "@gaia-project/viewer",
|
||||||
"version": "5.22.39",
|
"version": "5.22.40",
|
||||||
"description": "Functions to visualize the map and boards for gaia project inside html canvas",
|
"description": "Functions to visualize the map and boards for gaia project inside html canvas",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"coyotte508",
|
"coyotte508",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Engine, { AuctionVariant, Faction, Planet } from "@gaia-project/engine";
|
import Engine, { AuctionVariant, Faction, Planet, Resource, Reward } from "@gaia-project/engine";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { terraformCost3Set } from "./faction-overview";
|
import { gaiaMineExtraCost, hasGaiaMineSurcharge, terraformCost3Set } from "./faction-overview";
|
||||||
|
|
||||||
const row = [Planet.Volcanic, Planet.Ice, Planet.Titanium, Planet.Desert, Planet.Oxide, Planet.Terra, Planet.Swamp];
|
const row = [Planet.Volcanic, Planet.Ice, Planet.Titanium, Planet.Desert, Planet.Oxide, Planet.Terra, Planet.Swamp];
|
||||||
|
|
||||||
|
|
@ -47,3 +47,22 @@ describe("auction terraforming previews", () => {
|
||||||
expect(terraformCost3Set(engine, Faction.Moweyds, row)).to.have.members([Planet.Ice, Planet.Desert, Planet.Oxide]);
|
expect(terraformCost3Set(engine, Faction.Moweyds, row)).to.have.members([Planet.Ice, Planet.Desert, Planet.Oxide]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Gaia mine surcharge preview", () => {
|
||||||
|
for (const [faction, qics] of [
|
||||||
|
[Faction.Tinkeroids, 2],
|
||||||
|
[Faction.Darkanians, 2],
|
||||||
|
[Faction.SpaceGiants, 2],
|
||||||
|
[Faction.Moweyds, 1],
|
||||||
|
[Faction.Terrans, 1],
|
||||||
|
] as const) {
|
||||||
|
it(`shows ${faction}'s engine-derived cost`, () => {
|
||||||
|
const engine = new Engine(["init 2 gaia-preview"], { lostFleet: true });
|
||||||
|
const player = engine.players[0];
|
||||||
|
player.faction = faction;
|
||||||
|
player.loadFaction(null, engine.expansions);
|
||||||
|
expect(gaiaMineExtraCost(player)).to.deep.equal(new Reward(qics, Resource.Qic));
|
||||||
|
expect(hasGaiaMineSurcharge(player)).to.equal(qics > 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ export function exploreDeployCost(player: Player): Reward[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The cost to build a mine on a Gaia planet: 1 Q.I.C. by default, so only worth surfacing when a
|
// The cost to build a mine on a Gaia planet: 1 Q.I.C. by default, so only worth surfacing when a
|
||||||
// faction pays a genuine surcharge (Darkanians and Space Giants pay 2 Q.I.C.). Gleens' 1-ore
|
// faction pays a genuine surcharge (Tinkeroids, Darkanians and Space Giants pay 2 Q.I.C.). Gleens' 1-ore
|
||||||
// substitution is a lateral change covered by their faction ability, not an extra cost.
|
// substitution is a lateral change covered by their faction ability, not an extra cost.
|
||||||
export function gaiaMineExtraCost(player: Player): Reward {
|
export function gaiaMineExtraCost(player: Player): Reward {
|
||||||
return player.gaiaFormingCost();
|
return player.gaiaFormingCost();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue