diff --git a/client/src/app/pages/worship/worship.page.ts b/client/src/app/pages/worship/worship.page.ts index 19d3350..f909b51 100644 --- a/client/src/app/pages/worship/worship.page.ts +++ b/client/src/app/pages/worship/worship.page.ts @@ -50,7 +50,7 @@ export class WorshipPage implements OnInit { buff: OOCBuff.Offense, color: '#ef0107', description: - 'Pray to a powerful deity to gain a 15% attack boost for 1 hour.', + 'Pray to a powerful deity to gain a 15% offense boost for 1 hour.', }, { name: 'Spoodles', diff --git a/server/src/modules/content/playerhelper.service.ts b/server/src/modules/content/playerhelper.service.ts index 2e46b4d..0ece2b5 100644 --- a/server/src/modules/content/playerhelper.service.ts +++ b/server/src/modules/content/playerhelper.service.ts @@ -38,7 +38,7 @@ export class PlayerHelperService { gainXp(player: Player, xp = 1) { if (this.isDeityXpBuffActive(player) && xp > 0) { xp = Math.floor( - xp * percentNumberAsMultiplier(this.constants.worshipXpBoost), + xp + xp * percentNumberAsMultiplier(this.constants.worshipXpBoost), ); } @@ -57,7 +57,8 @@ export class PlayerHelperService { gainCoins(player: Player, amount = 1) { if (this.isDeityCoinsBuffActive(player) && amount > 0) { amount = Math.floor( - amount * percentNumberAsMultiplier(this.constants.worshipCoinBoost), + amount + + amount * percentNumberAsMultiplier(this.constants.worshipCoinBoost), ); } diff --git a/server/src/modules/gameplay/travel.service.ts b/server/src/modules/gameplay/travel.service.ts index 66ee6fe..35809df 100644 --- a/server/src/modules/gameplay/travel.service.ts +++ b/server/src/modules/gameplay/travel.service.ts @@ -64,7 +64,7 @@ export class TravelService { if (this.playerHelper.isDeityTravelSpeedBuffActive(playerRef)) { steps -= Math.floor( steps * - percentNumberAsMultiplier(this.constants.worshipTravelBoost, 0), + percentNumberAsMultiplier(this.constants.worshipTravelBoost), ); } diff --git a/server/src/modules/player/player.service.ts b/server/src/modules/player/player.service.ts index 2d210d3..06ae65b 100644 --- a/server/src/modules/player/player.service.ts +++ b/server/src/modules/player/player.service.ts @@ -550,25 +550,21 @@ export class PlayerService { }); if (this.playerHelper.isDeityDefenseBuffActive(player)) { - base.toughness += base.toughness * percentNumberAsMultiplier( - this.constants.worshipDefenseBoost, - 0, - ); - base.resistance += base.resistance * percentNumberAsMultiplier( - this.constants.worshipDefenseBoost, - 0, - ); + base.toughness += + base.toughness * + percentNumberAsMultiplier(this.constants.worshipDefenseBoost); + base.resistance += + base.resistance * + percentNumberAsMultiplier(this.constants.worshipDefenseBoost); } if (this.playerHelper.isDeityOffenseBuffActive(player)) { - base.power += base.power * percentNumberAsMultiplier( - this.constants.worshipOffenseBoost, - 0, - ); - base.magic += base.magic * percentNumberAsMultiplier( - this.constants.worshipOffenseBoost, - 0, - ); + base.power += + base.power * + percentNumberAsMultiplier(this.constants.worshipOffenseBoost); + base.magic += + base.magic * + percentNumberAsMultiplier(this.constants.worshipOffenseBoost); } return base; diff --git a/server/src/utils/number.ts b/server/src/utils/number.ts index 139fdda..014bcec 100644 --- a/server/src/utils/number.ts +++ b/server/src/utils/number.ts @@ -1,3 +1,3 @@ -export function percentNumberAsMultiplier(num: number, startAt = 1): number { - return startAt + num / 100; +export function percentNumberAsMultiplier(num: number): number { + return num / 100; }