0.1.39 P2: 飞升叙事视觉强化(金色辉光标题+仙韵边框+金边选项+ascension效果描述补全)
This commit is contained in:
@@ -17,7 +17,7 @@ const RES_NAME: Record<string, string> = {
|
|||||||
|
|
||||||
function describeEff(eff: Record<string, never> | { [k: string]: unknown }): string {
|
function describeEff(eff: Record<string, never> | { [k: string]: unknown }): string {
|
||||||
const parts: string[] = []
|
const parts: string[] = []
|
||||||
const e = eff as { res?: Record<string, number>; rep?: number; relation?: Record<string, number>; addBuilding?: string; pillGain?: Record<string, number>; mission?: string; addTech?: string; raid?: { npcId: string }; trib?: { mode: string }; feisheng?: { stay: boolean }; techniqueChance?: number; artifactChance?: number; flag?: Record<string, unknown> }
|
const e = eff as { res?: Record<string, number>; rep?: number; relation?: Record<string, number>; addBuilding?: string; pillGain?: Record<string, number>; mission?: string; addTech?: string; raid?: { npcId: string }; trib?: { mode: string }; feisheng?: { stay: boolean }; ascension?: { stage: string; mode: string }; techniqueChance?: number; artifactChance?: number; flag?: Record<string, unknown> }
|
||||||
if (e.res) {
|
if (e.res) {
|
||||||
for (const [k, v] of Object.entries(e.res)) {
|
for (const [k, v] of Object.entries(e.res)) {
|
||||||
const name = RES_NAME[k] ?? k
|
const name = RES_NAME[k] ?? k
|
||||||
@@ -41,6 +41,12 @@ function describeEff(eff: Record<string, never> | { [k: string]: unknown }): str
|
|||||||
parts.push(e.trib.mode === 'rash' ? '硬渡天劫' : e.trib.mode === 'guard' ? '护法渡劫' : '渡劫延一年')
|
parts.push(e.trib.mode === 'rash' ? '硬渡天劫' : e.trib.mode === 'guard' ? '护法渡劫' : '渡劫延一年')
|
||||||
}
|
}
|
||||||
if (e.feisheng) parts.push(e.feisheng.stay ? '留世不飞升' : '飞升离世')
|
if (e.feisheng) parts.push(e.feisheng.stay ? '留世不飞升' : '飞升离世')
|
||||||
|
// 0.1.39:飞升试炼效果描述
|
||||||
|
if (e.ascension) {
|
||||||
|
const stageName = e.ascension.stage === 'heart' ? '心魔试炼' : e.ascension.stage === 'heaven' ? '天劫试炼' : '飞升抉择'
|
||||||
|
const modeName = e.ascension.mode === 'rash' ? '硬抗' : e.ascension.mode === 'guard' ? '护持' : '延后'
|
||||||
|
parts.push(`${stageName}·${modeName}`)
|
||||||
|
}
|
||||||
return parts.join(' · ')
|
return parts.join(' · ')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,6 +61,9 @@ export function EventModal() {
|
|||||||
const [formation, setFormation] = useState<FormationId>('vanguard')
|
const [formation, setFormation] = useState<FormationId>('vanguard')
|
||||||
if (!pendingEventId || !pendingEventDef || !world) return null
|
if (!pendingEventId || !pendingEventDef || !world) return null
|
||||||
|
|
||||||
|
// 0.1.39:飞升事件视觉强化——金色辉光标题 + 仙韵边框 + 金边选项
|
||||||
|
const isAscension = pendingEventId.startsWith('ev-ascension-')
|
||||||
|
|
||||||
const raidIdx = pendingEventDef.options.findIndex((o) => o.eff.raid || o.eff.tournament)
|
const raidIdx = pendingEventDef.options.findIndex((o) => o.eff.raid || o.eff.tournament)
|
||||||
const squadPool: Character[] =
|
const squadPool: Character[] =
|
||||||
raidIdx >= 0
|
raidIdx >= 0
|
||||||
@@ -103,6 +112,7 @@ export function EventModal() {
|
|||||||
allowOuter={false}
|
allowOuter={false}
|
||||||
onClose={dorm}
|
onClose={dorm}
|
||||||
closeLabel="稍后再议"
|
closeLabel="稍后再议"
|
||||||
|
className={isAscension ? 'modal-ascension' : undefined}
|
||||||
footer={
|
footer={
|
||||||
squadPicking ? (
|
squadPicking ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export interface ModalShellProps {
|
|||||||
footerAlign?: 'right' | 'center' | 'space'
|
footerAlign?: 'right' | 'center' | 'space'
|
||||||
children: ReactNode
|
children: ReactNode
|
||||||
closeLabel?: string
|
closeLabel?: string
|
||||||
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,7 +30,8 @@ export function ModalShell({
|
|||||||
footer,
|
footer,
|
||||||
footerAlign = 'right',
|
footerAlign = 'right',
|
||||||
children,
|
children,
|
||||||
closeLabel = '关闭'
|
closeLabel = '关闭',
|
||||||
|
className
|
||||||
}: ModalShellProps) {
|
}: ModalShellProps) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onKey = (e: KeyboardEvent) => {
|
const onKey = (e: KeyboardEvent) => {
|
||||||
@@ -46,7 +48,7 @@ export function ModalShell({
|
|||||||
// 顶部菜单/主域均在其下(0.1.22 修复:弹框出现在宗族/谱系菜单下方的 z-index 越界)。
|
// 顶部菜单/主域均在其下(0.1.22 修复:弹框出现在宗族/谱系菜单下方的 z-index 越界)。
|
||||||
const shell = (
|
const shell = (
|
||||||
<div className="modal-outer" onClick={allowOuter ? onClose : undefined}>
|
<div className="modal-outer" onClick={allowOuter ? onClose : undefined}>
|
||||||
<div className="modal" style={{ width: `min(92vw, ${width}px)` }} onClick={(e) => e.stopPropagation()} data-modal-kind="shell">
|
<div className={`modal ${className ?? ''}`} style={{ width: `min(92vw, ${width}px)` }} onClick={(e) => e.stopPropagation()} data-modal-kind="shell">
|
||||||
<button className="modal-close" onClick={onClose} title={closeLabel} aria-label={closeLabel}>
|
<button className="modal-close" onClick={onClose} title={closeLabel} aria-label={closeLabel}>
|
||||||
×
|
×
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1910,3 +1910,35 @@ html[data-blade] .battle-lines {
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: #a8c2da;
|
color: #a8c2da;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------- 0.1.39 飞升叙事视觉强化 ---------- */
|
||||||
|
.modal-ascension .modal-title {
|
||||||
|
color: #8a6d2f;
|
||||||
|
text-shadow: 0 0 12px rgba(201, 162, 39, 0.5), 0 1px 0 rgba(255, 250, 235, 0.8);
|
||||||
|
letter-spacing: 8px;
|
||||||
|
}
|
||||||
|
.modal-ascension .modal-text {
|
||||||
|
border-top-color: rgba(201, 162, 39, 0.4);
|
||||||
|
border-bottom-color: rgba(201, 162, 39, 0.3);
|
||||||
|
color: #3a2f1a;
|
||||||
|
}
|
||||||
|
.modal-ascension .modal-cat {
|
||||||
|
color: #a08540;
|
||||||
|
}
|
||||||
|
.modal-ascension .opt-btn {
|
||||||
|
border-color: #c9a227;
|
||||||
|
background: linear-gradient(180deg, #fbf8ee, #f5edda);
|
||||||
|
}
|
||||||
|
.modal-ascension .opt-btn:hover {
|
||||||
|
border-color: #8a6d2f;
|
||||||
|
background: #fbf5e0;
|
||||||
|
box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.3), inset 0 1px 0 rgba(255, 255, 250, 0.6);
|
||||||
|
}
|
||||||
|
.modal-ascension .opt-btn .hint {
|
||||||
|
color: #8a6d2f;
|
||||||
|
}
|
||||||
|
.modal-ascension::before,
|
||||||
|
.modal-ascension::after {
|
||||||
|
background: linear-gradient(180deg, #3a3018, #241e0d);
|
||||||
|
border-color: #8a6d2f;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user