diff --git a/src/lib/game.ts b/src/lib/game.ts index 4f6de80..b3052e7 100644 --- a/src/lib/game.ts +++ b/src/lib/game.ts @@ -206,18 +206,21 @@ export class Game { explanation += `${defInfo.name}`; } else { const defInfos = defenderTypes.map(t => getTypeInfo(t)); - explanation += `${defInfos[0].name} / ${defInfos[1].name}`; + explanation += `${defInfos[0].name} and ${defInfos[1].name}`; } const effective = getEffectiveness(attackType, defenderTypes); const effectLabel = effectivenessToLabel(effective); - explanation += `

Effectiveness: ${effectLabel.label}`; + explanation += `

Overall effectiveness: ${effectLabel.label}`; if (defenderTypes.length > 1) { const first = getEffectiveness(attackType, [defenderTypes[0]]); const second = getEffectiveness(attackType, [defenderTypes[1]]); - explanation += `
(${effectivenessToLabel(first).short} × ${effectivenessToLabel(second).short} = ${effectLabel.short})`; + const def1Info = getTypeInfo(defenderTypes[0]); + const def2Info = getTypeInfo(defenderTypes[1]); + explanation += `

Against ${def1Info.name}: ${effectivenessToLabel(first).label}`; + explanation += `
Against ${def2Info.name}: ${effectivenessToLabel(second).label}`; } return explanation; diff --git a/src/main.ts b/src/main.ts index 2f9c703..7a4b66f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,7 +33,7 @@ function render(): void { const q = state.currentQuestion; const defenderHtml = q.defenderTypes.length === 1 ? renderTypeBadge(q.defenderTypes[0], 'large') - : `${renderTypeBadge(q.defenderTypes[0], 'large')} / ${renderTypeBadge(q.defenderTypes[1], 'large')}`; + : `${renderTypeBadge(q.defenderTypes[0], 'large')} ${renderTypeBadge(q.defenderTypes[1], 'large')}`; const optionsHtml = state.showResult ? '' : options.map((opt, i) => { let cls = 'option-btn'; @@ -108,7 +108,7 @@ function render(): void { function renderCombinationItem(combo: CombinationStats): string { const defenderHtml = combo.defenderTypes.length === 1 ? renderTypeBadge(combo.defenderTypes[0], 'small') - : `${renderTypeBadge(combo.defenderTypes[0], 'small')} / ${renderTypeBadge(combo.defenderTypes[1], 'small')}`; + : `${renderTypeBadge(combo.defenderTypes[0], 'small')} ${renderTypeBadge(combo.defenderTypes[1], 'small')}`; const accuracyClass = combo.accuracy >= 80 ? 'high' : combo.accuracy >= 50 ? 'medium' : 'low';