Skip to content

Commit 5e0794b

Browse files
authored
Merge pull request nuclear-unicorn#141 from PeterCheney/fix/policy
fix: Add missing check for shark relation bonus
2 parents 76d681f + e8817aa commit 5e0794b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/diplomacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ dojo.declare("classes.managers.DiplomacyManager", null, {
775775

776776
// Apply effects from sharkRelationsMerchants policy.
777777
var trades = game.stats.getStatCurrent("totalTrades").val;
778-
var sharkRelationsMerchantsBonus = Math.min(Math.round((Math.log10(Math.max(trades, 100)) - 1) * 3) / 100, 0.3);
778+
var sharkRelationsMerchantsBonus = this.game.science.getPolicy("sharkRelationsMerchants").researched ? Math.min(Math.round((Math.log10(Math.max(trades, 100)) - 1) * 3) / 100, 0.3) : 0;
779779

780780
return sharkRelationsMerchantsBonus + phantomTradeposts * tradepostsTradeRatio;
781781
}

0 commit comments

Comments
 (0)