feat(game): 게임 시스템 전면 개편 및 다국어 지원 확장
## 스킬 시스템 개선 - skill_data.dart: 스킬 데이터 구조 전면 개편 (+1176 라인) - skill_service.dart: 스킬 발동 로직 확장 및 버프 시스템 연동 - skill.dart: 스킬 모델 개선, 쿨다운/효과 타입 추가 ## Canvas 애니메이션 리팩토링 - battle_composer.dart 삭제 (레거시 위젯 기반 렌더러) - monster_colors.dart 삭제 (AsciiCell 색상 시스템으로 통합) - canvas_battle_composer.dart: z-index 정렬 (몬스터 z=1, 캐릭터 z=2, 이펙트 z=3) - ascii_cell.dart, ascii_layer.dart: 코드 정리 ## UI/UX 개선 - hp_mp_bar.dart: l10n 적용, 몬스터 HP 바 컴팩트화 - death_overlay.dart: 사망 화면 개선 - equipment_stats_panel.dart: 장비 스탯 표시 확장 - active_buff_panel.dart: 버프 패널 개선 - notification_overlay.dart: 알림 시스템 개선 ## 다국어 지원 확장 - game_text_l10n.dart: 게임 텍스트 통합 (+758 라인) - 한국어/일본어/영어/중국어 번역 업데이트 - ARB 파일 동기화 ## 게임 로직 개선 - progress_service.dart: 진행 로직 리팩토링 - combat_calculator.dart: 전투 계산 로직 개선 - stat_calculator.dart: 스탯 계산 시스템 개선 - story_service.dart: 스토리 진행 로직 개선 ## 기타 - theme_preferences.dart 삭제 (미사용) - 테스트 파일 업데이트 - class_data.dart: 클래스 데이터 정리
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
import 'package:askiineverdie/data/game_text_l10n.dart' as l10n;
|
||||
import 'package:askiineverdie/data/game_translations_ko.dart';
|
||||
import 'package:askiineverdie/src/core/util/pq_logic.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// 게임 데이터 번역을 위한 헬퍼 클래스
|
||||
/// 현재 로케일에 따라 게임 데이터의 번역을 제공합니다.
|
||||
///
|
||||
/// 글로벌 로케일 시스템(game_text_l10n.dart)을 사용하여 일관성 보장
|
||||
class GameDataL10n {
|
||||
GameDataL10n._();
|
||||
|
||||
/// 현재 로케일이 한국어인지 확인
|
||||
/// 현재 로케일이 한국어인지 확인 (글로벌 로케일 사용)
|
||||
static bool _isKorean(BuildContext context) {
|
||||
// 글로벌 로케일 우선, 폴백으로 context 로케일 사용
|
||||
if (l10n.isKoreanLocale) return true;
|
||||
final locale = Localizations.localeOf(context);
|
||||
return locale.languageCode == 'ko';
|
||||
}
|
||||
@@ -307,17 +312,19 @@ class GameDataL10n {
|
||||
for (final entry in baseMap.entries) {
|
||||
if (remaining.endsWith(entry.key)) {
|
||||
baseTranslated = entry.value;
|
||||
modifierPart = remaining.substring(
|
||||
0,
|
||||
remaining.length - entry.key.length,
|
||||
).trim();
|
||||
modifierPart = remaining
|
||||
.substring(0, remaining.length - entry.key.length)
|
||||
.trim();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. 수식어 번역
|
||||
final isWeapon = slotIndex == 0;
|
||||
final modWords = modifierPart.split(' ').where((s) => s.isNotEmpty).toList();
|
||||
final modWords = modifierPart
|
||||
.split(' ')
|
||||
.where((s) => s.isNotEmpty)
|
||||
.toList();
|
||||
final translatedMods = modWords.map((mod) {
|
||||
if (isWeapon) {
|
||||
return offenseAttribTranslationsKo[mod] ??
|
||||
@@ -423,19 +430,20 @@ class GameDataL10n {
|
||||
// 드롭 아이템 앞 부분이 몬스터 이름
|
||||
String monsterPart;
|
||||
if (itemString.endsWith(dropItemProperCase)) {
|
||||
monsterPart =
|
||||
itemString.substring(0, itemString.length - dropItemProperCase.length).trim();
|
||||
monsterPart = itemString
|
||||
.substring(0, itemString.length - dropItemProperCase.length)
|
||||
.trim();
|
||||
} else {
|
||||
monsterPart =
|
||||
itemString.substring(0, itemString.length - dropItem.length).trim();
|
||||
monsterPart = itemString
|
||||
.substring(0, itemString.length - dropItem.length)
|
||||
.trim();
|
||||
}
|
||||
|
||||
if (monsterPart.isEmpty) continue;
|
||||
|
||||
// 몬스터 이름 번역 (소문자를 원래 형태로 변환하여 찾기)
|
||||
final monsterNameKey = _toTitleCase(monsterPart);
|
||||
final monsterKo =
|
||||
monsterTranslationsKo[monsterNameKey] ?? monsterPart;
|
||||
final monsterKo = monsterTranslationsKo[monsterNameKey] ?? monsterPart;
|
||||
|
||||
final dropKo = entry.value;
|
||||
return '$monsterKo의 $dropKo';
|
||||
@@ -452,9 +460,12 @@ class GameDataL10n {
|
||||
|
||||
/// 각 단어의 첫 글자를 대문자로 (Title Case)
|
||||
static String _toTitleCase(String s) {
|
||||
return s.split(' ').map((word) {
|
||||
if (word.isEmpty) return word;
|
||||
return word[0].toUpperCase() + word.substring(1);
|
||||
}).join(' ');
|
||||
return s
|
||||
.split(' ')
|
||||
.map((word) {
|
||||
if (word.isEmpty) return word;
|
||||
return word[0].toUpperCase() + word.substring(1);
|
||||
})
|
||||
.join(' ');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user