refactor(model): SpellBook을 SkillBook으로 리네이밍

- 게임 컨셉에 맞게 주문서 → 스킬북 용어 통일
- 관련 모든 참조 일괄 변경
This commit is contained in:
JiWoong Sul
2026-01-06 18:45:16 +09:00
parent afc3c18ae4
commit 8d51263b2e
14 changed files with 114 additions and 114 deletions

View File

@@ -172,7 +172,7 @@ class _ArenaBattleScreenState extends State<ArenaBattleScreen>
message: '${widget.match.challenger.characterName} uses '
'${turn.challengerSkillUsed}!',
timestamp: DateTime.now(),
type: CombatLogType.spell,
type: CombatLogType.skill,
));
}
@@ -223,7 +223,7 @@ class _ArenaBattleScreenState extends State<ArenaBattleScreen>
message: '${widget.match.opponent.characterName} uses '
'${turn.opponentSkillUsed}!',
timestamp: DateTime.now(),
type: CombatLogType.spell,
type: CombatLogType.skill,
));
}

View File

@@ -366,7 +366,7 @@ class _GamePlayScreenState extends State<GamePlayScreen>
)
: (
game_l10n.combatSkillDamage(skillName, event.damage),
CombatLogType.spell,
CombatLogType.skill,
),
CombatEventType.playerHeal => (
game_l10n.combatSkillHeal(
@@ -1327,11 +1327,11 @@ class _GamePlayScreenState extends State<GamePlayScreen>
);
}
/// 통합 스킬 목록 (SpellBook 기반)
/// 통합 스킬 목록 (SkillBook 기반)
///
/// 스 이름, 랭크, 스킬 타입, 쿨타임 표시
/// 스 이름, 랭크, 스킬 타입, 쿨타임 표시
Widget _buildSkillsList(GameState state) {
if (state.spellBook.spells.isEmpty) {
if (state.skillBook.skills.isEmpty) {
return Center(
child: Text(
L10n.of(context).noSpellsYet,
@@ -1345,12 +1345,12 @@ class _GamePlayScreenState extends State<GamePlayScreen>
}
return ListView.builder(
itemCount: state.spellBook.spells.length,
itemCount: state.skillBook.skills.length,
padding: const EdgeInsets.symmetric(horizontal: 8),
itemBuilder: (context, index) {
final spell = state.spellBook.spells[index];
final skill = SkillData.getSkillBySpellName(spell.name);
final spellName = GameDataL10n.getSpellName(context, spell.name);
final skillEntry = state.skillBook.skills[index];
final skill = SkillData.getSkillBySpellName(skillEntry.name);
final skillName = GameDataL10n.getSpellName(context, skillEntry.name);
// 쿨타임 상태 확인
final skillState = skill != null
@@ -1361,8 +1361,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
!skillState.isReady(state.skillSystem.elapsedMs, skill!.cooldownMs);
return _SkillRow(
spellName: spellName,
rank: spell.rank,
skillName: skillName,
rank: skillEntry.rank,
skill: skill,
isOnCooldown: isOnCooldown,
);
@@ -1615,16 +1615,16 @@ class _GamePlayScreenState extends State<GamePlayScreen>
/// 스킬 행 위젯
///
/// 스 이름, 랭크, 스킬 타입 아이콘, 쿨타임 상태 표시
/// 스 이름, 랭크, 스킬 타입 아이콘, 쿨타임 상태 표시
class _SkillRow extends StatelessWidget {
const _SkillRow({
required this.spellName,
required this.skillName,
required this.rank,
required this.skill,
required this.isOnCooldown,
});
final String spellName;
final String skillName;
final String rank;
final Skill? skill;
final bool isOnCooldown;
@@ -1641,7 +1641,7 @@ class _SkillRow extends StatelessWidget {
// 스킬 이름
Expanded(
child: Text(
spellName,
skillName,
style: TextStyle(
fontSize: 11,
color: isOnCooldown ? Colors.grey : null,

View File

@@ -678,7 +678,7 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
children: [
// 0: 스킬
SkillsPage(
spellBook: state.spellBook,
skillBook: state.skillBook,
skillSystem: state.skillSystem,
),

View File

@@ -10,15 +10,15 @@ import 'package:asciineverdie/src/features/game/widgets/active_buff_panel.dart';
/// 스킬 페이지 (캐로셀)
///
/// SpellBook 기반 스킬 목록과 활성 버프 표시.
/// SkillBook 기반 스킬 목록과 활성 버프 표시.
class SkillsPage extends StatelessWidget {
const SkillsPage({
super.key,
required this.spellBook,
required this.skillBook,
required this.skillSystem,
});
final SpellBook spellBook;
final SkillBook skillBook;
final SkillSystemState skillSystem;
@override
@@ -61,7 +61,7 @@ class SkillsPage extends StatelessWidget {
}
Widget _buildSkillsList(BuildContext context) {
if (spellBook.spells.isEmpty) {
if (skillBook.skills.isEmpty) {
return Center(
child: Text(
L10n.of(context).noSpellsYet,
@@ -71,12 +71,12 @@ class SkillsPage extends StatelessWidget {
}
return ListView.builder(
itemCount: spellBook.spells.length,
itemCount: skillBook.skills.length,
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
itemBuilder: (context, index) {
final spell = spellBook.spells[index];
final skill = SkillData.getSkillBySpellName(spell.name);
final spellName = GameDataL10n.getSpellName(context, spell.name);
final skillEntry = skillBook.skills[index];
final skill = SkillData.getSkillBySpellName(skillEntry.name);
final skillName = GameDataL10n.getSpellName(context, skillEntry.name);
// 쿨타임 상태 확인
final skillState = skill != null
@@ -87,8 +87,8 @@ class SkillsPage extends StatelessWidget {
!skillState.isReady(skillSystem.elapsedMs, skill!.cooldownMs);
return _SkillRow(
spellName: spellName,
rank: spell.rank,
skillName: skillName,
rank: skillEntry.rank,
skill: skill,
isOnCooldown: isOnCooldown,
);
@@ -100,13 +100,13 @@ class SkillsPage extends StatelessWidget {
/// 스킬 행 위젯
class _SkillRow extends StatelessWidget {
const _SkillRow({
required this.spellName,
required this.skillName,
required this.rank,
required this.skill,
required this.isOnCooldown,
});
final String spellName;
final String skillName;
final String rank;
final Skill? skill;
final bool isOnCooldown;
@@ -123,7 +123,7 @@ class _SkillRow extends StatelessWidget {
// 스킬 이름
Expanded(
child: Text(
spellName,
skillName,
style: TextStyle(
fontSize: 13,
color: isOnCooldown ? Colors.grey : null,

View File

@@ -21,7 +21,7 @@ enum CombatLogType {
levelUp, // 레벨업
questComplete, // 퀘스트 완료
loot, // 전리품 획득
spell, // 스킬 사용
skill, // 스킬 사용
critical, // 크리티컬 히트
evade, // 회피
block, // 방패 방어
@@ -157,7 +157,7 @@ class _LogEntryTile extends StatelessWidget {
CombatLogType.levelUp => (Colors.amber, Icons.arrow_upward),
CombatLogType.questComplete => (Colors.blue.shade300, Icons.check_circle),
CombatLogType.loot => (Colors.orange.shade300, Icons.inventory_2),
CombatLogType.spell => (Colors.purple.shade300, Icons.auto_fix_high),
CombatLogType.skill => (Colors.purple.shade300, Icons.auto_fix_high),
CombatLogType.critical => (Colors.yellow.shade300, Icons.flash_on),
CombatLogType.evade => (Colors.cyan.shade300, Icons.directions_run),
CombatLogType.block => (Colors.blueGrey.shade300, Icons.shield),

View File

@@ -516,12 +516,12 @@ class _HallOfFameDetailDialog extends StatelessWidget {
),
const SizedBox(height: 16),
],
// 스 섹션 (Spells Section)
if (entry.finalSpells != null && entry.finalSpells!.isNotEmpty)
// 스 섹션 (Skills Section)
if (entry.finalSkills != null && entry.finalSkills!.isNotEmpty)
_buildSection(
icon: Icons.auto_fix_high,
title: l10n.hofSpells,
child: _buildSpellList(context),
child: _buildSkillList(context),
),
],
),
@@ -983,15 +983,15 @@ class _HallOfFameDetailDialog extends StatelessWidget {
return widgets;
}
Widget _buildSpellList(BuildContext context) {
final spells = entry.finalSpells!;
Widget _buildSkillList(BuildContext context) {
final skills = entry.finalSkills!;
return Wrap(
spacing: 8,
runSpacing: 4,
children: spells.map((spell) {
final name = spell['name'] ?? '';
final rank = spell['rank'] ?? '';
// 스 이름 번역 적용
children: skills.map((skill) {
final name = skill['name'] ?? '';
final rank = skill['rank'] ?? '';
// 스 이름 번역 적용
final translatedName = GameDataL10n.getSpellName(context, name);
return Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),

View File

@@ -261,7 +261,7 @@ class _NewCharacterScreenState extends State<NewCharacterScreen> {
stats: finalStats,
inventory: const Inventory(gold: 0, items: []),
equipment: Equipment.empty(),
spellBook: SpellBook.empty(),
skillBook: SkillBook.empty(),
progress: ProgressState.empty(),
queue: QueueState.empty(),
);