Skip to content

Commit 3860807

Browse files
fix: Shark relation bonus not applied correctly
Per feedback, the bonus should apply additive, not multiplicative.
1 parent 1116dff commit 3860807

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

js/diplomacy.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,11 @@ dojo.declare("classes.managers.DiplomacyManager", null, {
488488
}
489489

490490
var boughtResources = {};
491-
var tradeRatio = 1 + this.game.diplomacy.getTradeRatio() + this.game.diplomacy.calculateTradeBonusFromPolicies(race.name, this.game) + this.game.challenges.getChallenge("pacifism").getTradeBonusEffect(this.game);
491+
var tradeRatio =
492+
1
493+
+ this.game.diplomacy.getTradeRatio()
494+
+ this.game.diplomacy.calculateTradeBonusFromPolicies(race.name, this.game)
495+
+ this.game.challenges.getChallenge("pacifism").getTradeBonusEffect(this.game);
492496
var raceRatio = 1 + race.energy * 0.02;
493497
var currentSeason = this.game.calendar.getCurSeason().name;
494498

@@ -771,9 +775,9 @@ dojo.declare("classes.managers.DiplomacyManager", null, {
771775

772776
// Apply effects from sharkRelationsMerchants policy.
773777
var trades = game.stats.getStatCurrent("totalTrades").val;
774-
var sharkRelationsMerchantsRatio = Math.min(Math.round((Math.log10(Math.max(trades, 100)) - 1) * 3) / 100, 0.3);
778+
var sharkRelationsMerchantsBonus = Math.min(Math.round((Math.log10(Math.max(trades, 100)) - 1) * 3) / 100, 0.3);
775779

776-
return phantomTradeposts * tradepostsTradeRatio * sharkRelationsMerchantsRatio;
780+
return sharkRelationsMerchantsBonus + phantomTradeposts * tradepostsTradeRatio;
777781
}
778782
});
779783

0 commit comments

Comments
 (0)