// Active effects list (m.private.effects: band / 机变 / team / item / garrison effects with counters): // compact icon column at the right edge, rich-text tooltip per effect. `counterText` (a 悬赏's "还剩 N 场作战", user // playtest #6 item 4) replaces the bare counter in the tooltip's kind line. import { html, Tooltip, MicroLabel } from './components.js'; import { Img, RichText, GIcon } from './gameComponents.js'; import { effectIconUrl } from './assetUrls.js'; import { data } from '../data.js'; import { t, N_ } from '../../../shared/i18n.js'; const KIND = { band: N_('策略'), choice: N_('机变'), team: N_('团队增益'), item: N_('道具'), garrison: N_('特质') }; /** * A 悬赏's counter line in the current language: the battles its enemies still come for (server/match/player/views.js * sends the same Chinese text as `counterText` beside the count; a multi-round card has no count). * @param {{ counter?: number|null }} e */ export const bountyCounterText = (e) => (e.counter == null ? t('之后的每场作战') : t('还剩 {left} 场作战', { left: e.counter })); /** @param {{ effects: any[] }} props */ export function EffectsList({ effects }) { const list = (Array.isArray(effects) ? effects : []).filter((e) => e && (e.name || e.desc)); if (!list.length) return null; const m = data.get('assets'); return html`