| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- // 手绘 SVG 图标(线性、矢量、可缩放,无外部依赖)。署名:FmodeCode
- const S = (inner, vb = '0 0 32 32') => `<svg viewBox="${vb}" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${inner}</svg>`;
- export const I = {
- tree: (c = '#2fae6b') => S(`<path d="M16 29V15" stroke="${c}" stroke-width="2.2" stroke-linecap="round"/>
- <path d="M16 21 10 16M16 19l6-5M16 24l-4-3M16 23l4-2" stroke="${c}" stroke-width="1.8" stroke-linecap="round"/>
- <circle cx="10" cy="16" r="2.6" fill="#fff" stroke="${c}" stroke-width="1.8"/><circle cx="22" cy="14" r="2.6" fill="#fff" stroke="${c}" stroke-width="1.8"/>
- <circle cx="12" cy="21" r="1.8" fill="${c}"/><circle cx="20" cy="21" r="1.8" fill="${c}"/><path d="M7 29h18" stroke="#98a3b3" stroke-width="1.6" stroke-linecap="round"/>`),
- canopy: (c = '#b08427') => S(`<path d="M16 28V17" stroke="#6f7b8e" stroke-width="2" stroke-linecap="round"/>
- <path d="M6 14a10 10 0 0 1 20 0" stroke="${c}" stroke-width="2.2" stroke-linecap="round"/>
- <path d="M10 14a6 6 0 0 1 12 0" stroke="${c}" stroke-width="1.8" stroke-linecap="round"/>
- <circle cx="24" cy="24" r="2" fill="${c}"/><circle cx="27" cy="19" r="1.3" fill="${c}"/><circle cx="21" cy="27" r="1.2" fill="${c}"/>`),
- sprout: (c = '#5FD68A') => S(`<path d="M16 28V16" stroke="${c}" stroke-width="2.2" stroke-linecap="round"/>
- <path d="M16 18c-5 0-8-3-8-7 4 0 8 2 8 7Z" fill="#dcf5e6" stroke="${c}" stroke-width="1.6" stroke-linejoin="round"/>
- <path d="M16 16c5 0 8-3 8-7-4 0-8 2-8 7Z" fill="#fff" stroke="${c}" stroke-width="1.6" stroke-linejoin="round"/>`),
- firefly: (c = '#5FD68A') => S(`<circle cx="12" cy="13" r="3" fill="${c}"/><circle cx="22" cy="20" r="2.2" fill="${c}"/><circle cx="20" cy="9" r="1.6" fill="${c}"/>
- <path d="M9 24l4-4M23 24l-4-4M16 6v3" stroke="#6f7b8e" stroke-width="1.6" stroke-linecap="round"/>`),
- root: (c = '#5FD68A') => S(`<path d="M16 28V10M16 14l-6 6M16 12l6 7M16 20l-4 6M16 18l4 7" stroke="${c}" stroke-width="2" stroke-linecap="round"/>`),
- moth: (c = '#7FB2FF') => S(`<path d="M16 12c-2-5-8-8-10-4-2 3 1 9 4 10Z" fill="#e8f0ff" stroke="${c}" stroke-width="1.6" stroke-linejoin="round"/>
- <path d="M16 12c2-5 8-8 10-4 2 3-1 9-4 10Z" fill="#e8f0ff" stroke="${c}" stroke-width="1.6" stroke-linejoin="round"/>
- <path d="M16 12v10M14 8l-2-2M18 8l2-2" stroke="${c}" stroke-width="1.6" stroke-linecap="round"/>`),
- sign: (c = '#7FB2FF') => S(`<circle cx="16" cy="16" r="11" stroke="${c}" stroke-width="1.8"/><circle cx="20" cy="11" r="2.4" fill="${c}"/><circle cx="12" cy="17" r="1.6" fill="${c}"/><circle cx="21" cy="20" r="1.2" fill="${c}"/><path d="M6 16h20M16 6v20" stroke="#d7e3fa" stroke-width="1"/>`),
- eye: (c = '#C08BFF') => S(`<path d="M4 16s5-8 12-8 12 8 12 8-5 8-12 8S4 16 4 16Z" stroke="${c}" stroke-width="1.9" stroke-linejoin="round"/><circle cx="16" cy="16" r="3.6" fill="${c}"/><circle cx="17.4" cy="14.6" r="1.1" fill="#fff"/>`),
- maw: (c = '#C08BFF') => S(`<path d="M6 10c6 6 14 6 20 0" stroke="${c}" stroke-width="2" stroke-linecap="round"/><path d="M6 10 9 16 12 11 15 17 18 11 21 16 26 10" stroke="${c}" stroke-width="1.6" stroke-linejoin="round"/><path d="M8 22c4 3 12 3 16 0" stroke="#98a3b3" stroke-width="1.6" stroke-linecap="round"/>`),
- strider: (c = '#C08BFF') => S(`<circle cx="16" cy="9" r="3" fill="${c}"/><path d="M16 12v7M16 14l-5 3M16 14l5 3M16 19l-4 8M16 19l4 8" stroke="${c}" stroke-width="2" stroke-linecap="round"/>`),
- crystal: (c = '#b08427') => S(`<path d="M16 4 25 12 20 28h-8L7 12 16 4Z" stroke="${c}" stroke-width="1.9" stroke-linejoin="round" fill="#fdf6e6"/><path d="M16 4v24M7 12l9 5 9-5" stroke="${c}" stroke-width="1.3" stroke-linejoin="round"/>`),
- seed: (c = '#b08427') => S(`<path d="M16 27c-6-4-8-10-5-15 3-5 9-5 11-2 3 4-1 13-6 17Z" fill="#fdf6e6" stroke="${c}" stroke-width="1.8" stroke-linejoin="round"/><path d="M16 24C15 18 16 14 19 11" stroke="${c}" stroke-width="1.4" stroke-linecap="round"/>`),
- star: (c = '#b08427') => S(`<path d="m16 5 3 7 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1 3-7Z" stroke="${c}" stroke-width="1.8" stroke-linejoin="round" fill="#fdf6e6"/>`),
- gear: (c = '#b08427') => S(`<circle cx="16" cy="16" r="5" stroke="${c}" stroke-width="1.9"/><path d="M16 5v4M16 23v4M5 16h4M23 16h4M8.2 8.2l2.8 2.8M21 21l2.8 2.8M8.2 23.8 11 21M21 11l2.8-2.8" stroke="${c}" stroke-width="1.9" stroke-linecap="round"/>`),
- rune: (c = '#b08427') => S(`<rect x="7" y="5" width="18" height="22" rx="2" stroke="${c}" stroke-width="1.8" fill="#fdf6e6"/><path d="M12 11h8M12 15h6M12 19h8M12 23h4" stroke="${c}" stroke-width="1.5" stroke-linecap="round"/>`),
- hourglass: (c = '#b08427') => S(`<path d="M9 5h14M9 27h14M10 5c0 7 12 7 12 11s-12 4-12 11M22 5c0 7-12 7-12 11s12 4 12 11" stroke="${c}" stroke-width="1.8" stroke-linecap="round"/>`),
- leaf: (c = '#b08427') => S(`<path d="M25 7C13 7 7 13 8 22c9 1 16-5 17-15Z" fill="#fdf6e6" stroke="${c}" stroke-width="1.8" stroke-linejoin="round"/><path d="M8 24c4-5 8-8 13-11" stroke="${c}" stroke-width="1.5" stroke-linecap="round"/>`),
- orbit: (c = '#b08427') => S(`<circle cx="16" cy="16" r="4" fill="#fdf6e6" stroke="${c}" stroke-width="1.8"/><ellipse cx="16" cy="16" rx="12" ry="5" stroke="${c}" stroke-width="1.5" transform="rotate(-25 16 16)"/><circle cx="26" cy="9" r="1.8" fill="${c}"/>`),
- void: (c = '#b08427') => S(`<circle cx="16" cy="16" r="11" stroke="${c}" stroke-width="1.8"/><path d="M16 5v22M5 16h22" stroke="${c}" stroke-width="1.3"/><path d="M9 9l14 14" stroke="#fff" stroke-width="1" opacity=".4"/>`),
- flag: () => S(`<path d="M9 28V5" stroke="#121a2b" stroke-width="2.2" stroke-linecap="round"/><path d="M10 6h13l-3 5 3 5H10Z" fill="#2fae6b"/>`),
- rift: () => S(`<path d="M18 4 9 17h6l-3 11 11-16h-7l2-8Z" stroke="#6c5ce7" stroke-width="1.9" stroke-linejoin="round" fill="#f0ecfb"/>`),
- sword: (c = '#6f7b8e') => S(`<path d="M6 26 22 8l4-4-1 6L9 25" stroke="${c}" stroke-width="2" stroke-linejoin="round"/><path d="M6 20l6 6M4 28l3-3" stroke="${c}" stroke-width="2" stroke-linecap="round"/>`),
- calendar: () => S(`<rect x="5" y="7" width="22" height="20" rx="3" stroke="currentColor" stroke-width="1.8"/><path d="M5 12h22M11 4v6M21 4v6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>`),
- coin: () => S(`<circle cx="16" cy="16" r="11" stroke="currentColor" stroke-width="1.8"/><path d="M12 12h8M12 20h8M16 9v14" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>`),
- };
- /** 遗物 id → 图标 */
- export const relicIcon = (id, c = '#b08427') => (I[id] ? I[id](c) : I.star(c));
- /** 兵种 id → 图标 */
- export const lifeIcon = (id) => (I[id] && I[id]('#5FD68A')) || I.tree();
|