라이브 티커 · 갤럭시 검색 색인 · 주간 랭킹 스냅샷 · 연속 ZAP 상한 · 가입 행성 Zap · 성운 목표 · 랭킹 갱신 안내 · 행성 터치 반응

This commit is contained in:
Sn-Kinos
2026-10-05 22:38:42 +09:00
parent 000c058097
commit 4bb92c2ee7
44 changed files with 727 additions and 78 deletions
@@ -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),
);
}
+1
View File
@@ -165,6 +165,7 @@ class Repositories {
colorKey: current.colorKey,
isHibernating: current.isHibernating,
level: current.level,
evolutionImminent: current.evolutionImminent,
isEclipsed: isEclipsed,
isHeroTime: isHeroTime,
heroEventIds: heroEventIds,