diff --git a/calc/src/desc.ts b/calc/src/desc.ts index 700fd1829..c1a543aff 100644 --- a/calc/src/desc.ts +++ b/calc/src/desc.ts @@ -873,16 +873,16 @@ function buildDescription(description: RawDesc, attacker: Pokemon, defender: Pok output += 'Helping Hand '; } if (description.isFlowerGiftAttacker) { - output += ' with an ally\'s Flower Gift '; + output += 'with an ally\'s Flower Gift '; } if (description.isBattery) { - output += ' Battery boosted '; + output += 'Battery boosted '; } if (description.isPowerSpot) { - output += ' Power Spot boosted '; + output += 'Power Spot boosted '; } if (description.isSwitching) { - output += ' switching boosted '; + output += 'switching boosted '; } output += description.moveName + ' '; if (description.moveBP && description.moveType) { diff --git a/calc/src/test/calc.test.ts b/calc/src/test/calc.test.ts index 1a2e7411b..4f73bad74 100644 --- a/calc/src/test/calc.test.ts +++ b/calc/src/test/calc.test.ts @@ -1000,6 +1000,26 @@ describe('calc', () => { result = calculate(attacker, defender, Move('Revelation Dance')); expect(result.move.type).toBe('Water'); }); + + test('Flower Gift, Power Spot, Battery, and switching boosts shouldn\'t have double spaces', () => { + const attacker = Pokemon('Weavile'); + const defender = Pokemon('Vulpix'); + const field = Field({ + weather: 'Sun', + attackerSide: { + isFlowerGift: true, + isPowerSpot: true, + }, + defenderSide: { + isSwitching: 'out', + }, + }); + const result = calculate(attacker, defender, Move('Pursuit'), field); + + expect(result.desc()).toBe( + "0 Atk Weavile with an ally's Flower Gift Power Spot boosted switching boosted Pursuit (80 BP) vs. 0 HP / 0 Def Vulpix in Sun: 399-469 (183.8 - 216.1%) -- guaranteed OHKO" + ); + }); }); }); });