징병 모병 병종 활성화 조건을 표시
This commit is contained in:
@@ -26,6 +26,7 @@ import { getTechAbility, getTechLevel, isCrewTypeAvailable } from '@sammo-ts/log
|
||||
import { asRecord, isRecord } from '@sammo-ts/common';
|
||||
|
||||
import type { CityRow, GeneralRow, NationRow, WorldStateRow } from '../context.js';
|
||||
import { formatCrewTypeRequirement } from '../services/gameDisplayNames.js';
|
||||
import {
|
||||
buildTurnCommandInputFields,
|
||||
loadTurnCommandSpecs,
|
||||
@@ -558,7 +559,10 @@ export const buildRecruitmentCommandInfo = (options: {
|
||||
avoid: crewType.avoid,
|
||||
baseCost: displayCost.gold,
|
||||
baseRice: displayCost.rice,
|
||||
info: [...crewType.info],
|
||||
info: [
|
||||
...crewType.info,
|
||||
...crewType.requirements.map(formatCrewTypeRequirement).filter(Boolean),
|
||||
],
|
||||
};
|
||||
}),
|
||||
}));
|
||||
|
||||
@@ -676,7 +676,11 @@ describe('buildTurnCommandTable', () => {
|
||||
magicCoef: 0,
|
||||
cost: 12,
|
||||
rice: 10,
|
||||
requirements: [{ type: 'ReqTech', tech: 2000 }],
|
||||
requirements: [
|
||||
{ type: 'ReqTech', tech: 2000 },
|
||||
{ type: 'ReqRegions', regions: ['중원'] },
|
||||
{ type: 'ReqCities', cities: ['TestCity'] },
|
||||
],
|
||||
attackCoef: {},
|
||||
defenceCoef: {},
|
||||
info: ['강력하지만 기술이 필요합니다.'],
|
||||
@@ -734,7 +738,12 @@ describe('buildTurnCommandTable', () => {
|
||||
special: true,
|
||||
attack: 175,
|
||||
defence: 225,
|
||||
info: ['강력하지만 기술이 필요합니다.'],
|
||||
info: [
|
||||
'강력하지만 기술이 필요합니다.',
|
||||
'기술력 2000 이상 필요',
|
||||
'중원 지역 소유시 가능',
|
||||
'TestCity 소유시 가능',
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -277,7 +277,12 @@ const inputOptions = {
|
||||
avoid: 20,
|
||||
baseCost: 13.8,
|
||||
baseRice: 11.5,
|
||||
info: ['강력하지만 기술이 필요합니다.'],
|
||||
info: [
|
||||
'강력하지만 기술이 필요합니다.',
|
||||
'기술력 2000 이상 필요',
|
||||
'중원 지역 소유시 가능',
|
||||
'저 소유시 가능',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -1905,6 +1910,9 @@ test('uses a Ref-style full recruitment page without horizontal overflow on desk
|
||||
const unavailable = form.getByRole('button', { name: '정예병 선택 불가', exact: true });
|
||||
await expect(unavailable).toBeVisible();
|
||||
await expect(unavailable.locator('.crew-name')).toHaveCSS('background-color', 'rgb(201, 0, 0)');
|
||||
await expect(unavailable.locator('.crew-info')).toHaveText(
|
||||
'강력하지만 기술이 필요합니다.기술력 2000 이상 필요중원 지역 소유시 가능저 소유시 가능'
|
||||
);
|
||||
|
||||
const desktopGeometry = await form.evaluate(async (element) => {
|
||||
const row = element.querySelector('.crew-row');
|
||||
|
||||
Reference in New Issue
Block a user