@gaia-project/engine
Advanced tools
Comparing version 4.8.47 to 4.8.48
{ | ||
"name": "@gaia-project/engine", | ||
"version": "4.8.47", | ||
"version": "4.8.48", | ||
"description": "Javascript engine for project gaia", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -8,2 +8,7 @@ "use strict"; | ||
const reward_1 = __importDefault(require("../reward")); | ||
function gainExtraKnowledge(player, hex) { | ||
if (player.data.hasPlanetaryInstitute() && player.data.isNewPlanetType(hex)) { | ||
player.gainRewards([new reward_1.default("3k")], enums_1.Faction.Geodens); | ||
} | ||
} | ||
const geodens = { | ||
@@ -14,7 +19,4 @@ faction: enums_1.Faction.Geodens, | ||
handlers: { | ||
[`build-${enums_1.Building.Mine}`]: (player, hex) => { | ||
if (player.data.hasPlanetaryInstitute() && player.data.isNewPlanetType(hex)) { | ||
player.gainRewards([new reward_1.default("3k")], enums_1.Faction.Geodens); | ||
} | ||
}, | ||
[`build-${enums_1.Building.Mine}`]: (player, hex) => gainExtraKnowledge(player, hex), | ||
[`build-${enums_1.Building.Colony}`]: (player, hex) => gainExtraKnowledge(player, hex), | ||
}, | ||
@@ -21,0 +23,0 @@ }, |
@@ -8,2 +8,7 @@ "use strict"; | ||
const reward_1 = __importDefault(require("../reward")); | ||
function gaiaVp(hex, player) { | ||
if (hex.data.planet === enums_1.Planet.Gaia) { | ||
player.gainRewards([new reward_1.default("2vp")], enums_1.Faction.Gleens); | ||
} | ||
} | ||
const gleens = { | ||
@@ -20,7 +25,4 @@ faction: enums_1.Faction.Gleens, | ||
[`build-${enums_1.Building.PlanetaryInstitute}`]: (player) => player.gainFederationToken(enums_1.Federation.Gleens), | ||
[`build-${enums_1.Building.Mine}`]: (player, hex) => { | ||
if (hex.data.planet === enums_1.Planet.Gaia) { | ||
player.gainRewards([new reward_1.default("2vp")], enums_1.Faction.Gleens); | ||
} | ||
}, | ||
[`build-${enums_1.Building.Mine}`]: (player, hex) => gaiaVp(hex, player), | ||
[`build-${enums_1.Building.Colony}`]: (player, hex) => gaiaVp(hex, player), | ||
}, | ||
@@ -27,0 +29,0 @@ }, |
{ | ||
"name": "@gaia-project/engine", | ||
"version": "4.8.47", | ||
"version": "4.8.48", | ||
"description": "Javascript engine for project gaia", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -7,2 +7,8 @@ import { Building, Faction } from "../enums"; | ||
function gainExtraKnowledge(player: Player, hex: GaiaHex) { | ||
if (player.data.hasPlanetaryInstitute() && player.data.isNewPlanetType(hex)) { | ||
player.gainRewards([new Reward("3k")], Faction.Geodens); | ||
} | ||
} | ||
const geodens: FactionBoardVariants = { | ||
@@ -13,7 +19,4 @@ faction: Faction.Geodens, | ||
handlers: { | ||
[`build-${Building.Mine}`]: (player: Player, hex: GaiaHex) => { | ||
if (player.data.hasPlanetaryInstitute() && player.data.isNewPlanetType(hex)) { | ||
player.gainRewards([new Reward("3k")], Faction.Geodens); | ||
} | ||
}, | ||
[`build-${Building.Mine}`]: (player: Player, hex: GaiaHex) => gainExtraKnowledge(player, hex), | ||
[`build-${Building.Colony}`]: (player: Player, hex: GaiaHex) => gainExtraKnowledge(player, hex), | ||
}, | ||
@@ -20,0 +23,0 @@ }, |
@@ -7,2 +7,8 @@ import { Building, Faction, Federation, Planet } from "../enums"; | ||
function gaiaVp(hex: GaiaHex, player: Player) { | ||
if (hex.data.planet === Planet.Gaia) { | ||
player.gainRewards([new Reward("2vp")], Faction.Gleens); | ||
} | ||
} | ||
const gleens: FactionBoardVariants = { | ||
@@ -19,7 +25,4 @@ faction: Faction.Gleens, | ||
[`build-${Building.PlanetaryInstitute}`]: (player: Player) => player.gainFederationToken(Federation.Gleens), | ||
[`build-${Building.Mine}`]: (player: Player, hex: GaiaHex) => { | ||
if (hex.data.planet === Planet.Gaia) { | ||
player.gainRewards([new Reward("2vp")], Faction.Gleens); | ||
} | ||
}, | ||
[`build-${Building.Mine}`]: (player: Player, hex: GaiaHex) => gaiaVp(hex, player), | ||
[`build-${Building.Colony}`]: (player: Player, hex: GaiaHex) => gaiaVp(hex, player), | ||
}, | ||
@@ -26,0 +29,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1172108
24093