라이브 티커 · 갤럭시 검색 색인 · 주간 랭킹 스냅샷 · 연속 ZAP 상한 · 가입 행성 Zap · 성운 목표 · 랭킹 갱신 안내 · 행성 터치 반응
This commit is contained in:
@@ -11,9 +11,29 @@ class PlanetVisualState {
|
||||
this.heroNicknames = const [],
|
||||
this.heroClaimCount,
|
||||
this.colorKey,
|
||||
this.evolutionImminent = false,
|
||||
});
|
||||
final int? stage;
|
||||
|
||||
/// 다음 Stage 진화 5% 전 — Figma `2024:20758` 「다음 단계 진화 수치 도달 5%전 : 행성에 표면 아우라 발생」.
|
||||
/// 서버가 적은 레벨업 진행도(`levelPop` · `sfpi`)와 다음 Stage 진입 누계(`nextStagePop` · `nextStageSfpi`)로
|
||||
/// 판정한다. 두 조건 동시 충족이 진화이므로 **낮은 쪽**이 95% 이상일 때다.
|
||||
final bool evolutionImminent;
|
||||
|
||||
static bool imminentFrom(Map<String, dynamic> data) {
|
||||
double? ratio(String have, String need) {
|
||||
final h = data[have];
|
||||
final n = data[need];
|
||||
return h is num && n is num && n > 0 ? h / n : null;
|
||||
}
|
||||
|
||||
final pop = ratio('levelPop', 'nextStagePop');
|
||||
final sfpi = ratio('sfpi', 'nextStageSfpi');
|
||||
if (pop == null || sfpi == null) return false;
|
||||
final low = pop < sfpi ? pop : sfpi;
|
||||
return low >= 0.95 && low < 1;
|
||||
}
|
||||
|
||||
/// 생성 때 고른 행성 컬러 키(C-50 · `fn-planet-create`). 성운이면 null 이다.
|
||||
final String? colorKey;
|
||||
final int? level;
|
||||
@@ -42,6 +62,7 @@ class PlanetVisualState {
|
||||
int n when n >= 0 => n,
|
||||
_ => null,
|
||||
},
|
||||
evolutionImminent: imminentFrom(data),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@ class Repositories {
|
||||
colorKey: current.colorKey,
|
||||
isHibernating: current.isHibernating,
|
||||
level: current.level,
|
||||
evolutionImminent: current.evolutionImminent,
|
||||
isEclipsed: isEclipsed,
|
||||
isHeroTime: isHeroTime,
|
||||
heroEventIds: heroEventIds,
|
||||
|
||||
@@ -42,6 +42,7 @@ class LivePlanet25D extends StatelessWidget {
|
||||
tint: planetColorOf(state?.colorKey),
|
||||
stage: state == null ? stage : state.stage,
|
||||
level: state?.level,
|
||||
evolutionImminent: state?.evolutionImminent ?? false,
|
||||
isEclipsed: state?.isEclipsed ?? false,
|
||||
isHibernating: state?.isHibernating ?? false,
|
||||
isHeroTime: state?.isHeroTime ?? false,
|
||||
|
||||
@@ -70,6 +70,7 @@ class Planet25D extends StatefulWidget {
|
||||
this.tint,
|
||||
this.stage,
|
||||
this.level,
|
||||
this.evolutionImminent = false,
|
||||
this.isEclipsed = false,
|
||||
this.isHibernating = false,
|
||||
this.isHeroTime = false,
|
||||
@@ -79,6 +80,9 @@ class Planet25D extends StatefulWidget {
|
||||
this.animate = true,
|
||||
});
|
||||
|
||||
/// 다음 Stage 진화 5% 전 — 표면 아우라([PlanetVisualState.evolutionImminent]).
|
||||
final bool evolutionImminent;
|
||||
|
||||
/// 행성 일러스트 자산 경로(`assets/figma/planet-*.png`).
|
||||
final VoidCallback? onOpenHistory;
|
||||
final String image;
|
||||
@@ -281,7 +285,8 @@ class _Planet25DState extends State<Planet25D>
|
||||
),
|
||||
),
|
||||
),
|
||||
if (stage == 6)
|
||||
// Stage6 지속 아우라 · 진화 5% 전 표면 아우라(Figma `2024:20758`) — 같은 에셋 레이어를 쓴다.
|
||||
if (stage == 6 || widget.evolutionImminent)
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
child: CustomPaint(
|
||||
|
||||
Reference in New Issue
Block a user