feat(core): 몬스터 등급 시스템 추가

- MonsterGrade 열거형 및 색상 정의
- GameState/ItemStats 확장
- pq_logic 유틸리티 함수 추가
- ASCII 색상 상수 추가
This commit is contained in:
JiWoong Sul
2026-01-05 17:52:47 +09:00
parent e112378ad2
commit 5c8ab0d3f4
5 changed files with 156 additions and 0 deletions

View File

@@ -32,6 +32,26 @@ class AsciiColors {
static Color backgroundOf(BuildContext context) =>
RetroColors.isDarkMode(context) ? background : _lightBackground;
// ═══════════════════════════════════════════════════════════════════════
// 무기 등급(ItemRarity) 색상 Getter (테마 인식, Phase 9)
// ═══════════════════════════════════════════════════════════════════════
/// Uncommon 등급 색상 - 테마 인식
static Color rarityUncommonOf(BuildContext context) =>
RetroColors.isDarkMode(context) ? rarityUncommon : _lightRarityUncommon;
/// Rare 등급 색상 - 테마 인식
static Color rarityRareOf(BuildContext context) =>
RetroColors.isDarkMode(context) ? rarityRare : _lightRarityRare;
/// Epic 등급 색상 - 테마 인식
static Color rarityEpicOf(BuildContext context) =>
RetroColors.isDarkMode(context) ? rarityEpic : _lightRarityEpic;
/// Legendary 등급 색상 - 테마 인식
static Color rarityLegendaryOf(BuildContext context) =>
RetroColors.isDarkMode(context) ? rarityLegendary : _lightRarityLegendary;
// ═══════════════════════════════════════════════════════════════════════
// 라이트 모드 색상 (양피지/크림 기반)
// ═══════════════════════════════════════════════════════════════════════
@@ -48,6 +68,18 @@ class AsciiColors {
/// 라이트 모드 배경 (양피지 크림)
static const Color _lightBackground = Color(0xFFF5E6C8);
/// 라이트 모드 Uncommon 등급 (진한 초록)
static const Color _lightRarityUncommon = Color(0xFF008800);
/// 라이트 모드 Rare 등급 (진한 파랑)
static const Color _lightRarityRare = Color(0xFF0055AA);
/// 라이트 모드 Epic 등급 (진한 보라)
static const Color _lightRarityEpic = Color(0xFF660099);
/// 라이트 모드 Legendary 등급 (진한 금색)
static const Color _lightRarityLegendary = Color(0xFFCC7700);
// ═══════════════════════════════════════════════════════════════════════
// 레거시 정적 색상 (다크 모드 기본값 / context 없는 곳에서 사용)
// ═══════════════════════════════════════════════════════════════════════
@@ -64,6 +96,22 @@ class AsciiColors {
/// 배경 색상
static const Color background = Colors.black;
// ═══════════════════════════════════════════════════════════════════════
// 무기 등급(ItemRarity) 정적 색상 (다크 모드 기본값, Phase 9)
// ═══════════════════════════════════════════════════════════════════════
/// Uncommon 등급 (밝은 초록)
static const Color rarityUncommon = Color(0xFF00FF00);
/// Rare 등급 (밝은 파랑)
static const Color rarityRare = Color(0xFF0088FF);
/// Epic 등급 (밝은 보라)
static const Color rarityEpic = Color(0xFF9900FF);
/// Legendary 등급 (밝은 금색)
static const Color rarityLegendary = Color(0xFFFFAA00);
/// 상황에 따른 색상 반환
static Color forContext(AsciiColorContext context) {
return switch (context) {