@gaia-project/engine
Advanced tools
Comparing version 4.8.45 to 4.8.46
{ | ||
"name": "@gaia-project/engine", | ||
"version": "4.8.45", | ||
"version": "4.8.46", | ||
"description": "Javascript engine for project gaia", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -185,7 +185,7 @@ "use strict"; | ||
for (const cost of costs) { | ||
this.data.gainReward(this.factionReward(cost, source), true, source); | ||
this.data.gainReward(this.factionReward(cost, source, true), true, source); | ||
} | ||
} | ||
gainRewards(rewards, source) { | ||
this.data.gainRewards(rewards.map((rew) => this.factionReward(rew, source)), false, source); | ||
this.data.gainRewards(rewards.map((rew) => this.factionReward(rew, source, false)), false, source); | ||
} | ||
@@ -698,3 +698,3 @@ maxPayRange(cost) { | ||
} | ||
factionReward(reward, source) { | ||
factionReward(reward, source, pay) { | ||
if (this.faction === enums_1.Faction.Terrans && reward.type === enums_1.Resource.GainTokenGaiaArea) { | ||
@@ -704,3 +704,4 @@ return new reward_1.default(-reward.count, enums_1.Resource.MoveTokenFromGaiaAreaToArea1); | ||
// this is for Gleens getting ore instead of qics until Academy2 | ||
if (source !== enums_1.Phase.BeginGame && | ||
if (!pay && | ||
source !== enums_1.Phase.BeginGame && | ||
this.faction === enums_1.Faction.Gleens && | ||
@@ -707,0 +708,0 @@ this.data.buildings[enums_1.Building.Academy2] === 0 && |
{ | ||
"name": "@gaia-project/engine", | ||
"version": "4.8.45", | ||
"version": "4.8.46", | ||
"description": "Javascript engine for project gaia", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -247,3 +247,3 @@ import assert from "assert"; | ||
for (const cost of costs) { | ||
this.data.gainReward(this.factionReward(cost, source), true, source); | ||
this.data.gainReward(this.factionReward(cost, source, true), true, source); | ||
} | ||
@@ -254,3 +254,3 @@ } | ||
this.data.gainRewards( | ||
rewards.map((rew) => this.factionReward(rew, source)), | ||
rewards.map((rew) => this.factionReward(rew, source, false)), | ||
false, | ||
@@ -891,3 +891,3 @@ source | ||
factionReward(reward: Reward, source: EventSource): Reward { | ||
factionReward(reward: Reward, source: EventSource, pay: boolean): Reward { | ||
if (this.faction === Faction.Terrans && reward.type === Resource.GainTokenGaiaArea) { | ||
@@ -898,2 +898,3 @@ return new Reward(-reward.count, Resource.MoveTokenFromGaiaAreaToArea1); | ||
if ( | ||
!pay && | ||
source !== Phase.BeginGame && | ||
@@ -900,0 +901,0 @@ this.faction === Faction.Gleens && |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1168234
24032