This commit is contained in:
2025-12-16 02:13:31 +09:00
parent c029cd1e10
commit f5a7eb2db9
19 changed files with 378 additions and 87 deletions
+15 -4
View File
@@ -15,11 +15,12 @@
1. **메인 메뉴 (`MainMenuScreen`):** 게임 시작, 이어하기(저장된 데이터 있을 시), 설정 버튼.
2. **캐릭터 선택 (`CharacterSelectionScreen`):** 'Warrior' 직업 구현 (스탯 확인 후 시작).
3. **메인 게임 (`MainWrapper`):** 하단 탭 네비게이션 (Battle / Inventory / Settings).
4. **설정 (`SettingsScreen`):**
3. **스토리 (`StoryScreen`):** 게임 시작 전 3페이지 분량의 스토리 컷신 제공 (Skip 가능).
4. **메인 게임 (`MainWrapper`):** 하단 탭 네비게이션 (Battle / Inventory / Settings).
5. **설정 (`SettingsScreen`):**
- 적 애니메이션 활성화/비활성화 토글 (`SettingsProvider` 연동).
- 게임 재시작, 메인 메뉴로 돌아가기 기능.
5. **반응형 레이아웃 (Responsive UI):**
6. **반응형 레이아웃 (Responsive UI):**
- `ResponsiveContainer`를 통해 다양한 화면 크기 대응 (최대 너비/높이 제한).
- Battle UI: 플레이어(좌하단) vs 적(우상단) 대각선 구도.
@@ -44,9 +45,11 @@
- **애니메이션 및 타격감 (Visuals & Impact):**
- **UI 주도 Impact 처리:** 애니메이션 타격 시점(`onImpact`)에 정확히 데미지가 적용되고 텍스트가 뜸 (완벽한 동기화).
- **적 돌진:** 적도 공격 시 플레이어 위치로 돌진함 (설정에서 끄기 가능).
- **다이내믹 애니메이션 페이즈:** 공격 애니메이션을 Start, Middle, End 단계로 나누어 각 단계별로 캐릭터 이미지가 변경됨 (예: 공격 준비 -> 타격 모션).
- **이펙트:** 타격 아이콘, 데미지 텍스트(Floating Text, Risky 공격 시 크기 확대), 화면 흔들림(`ShakeWidget`), 폭발(`ExplosionWidget`). **적 방어 시 성공/실패 이펙트 추가.**
- **배경:** 전투 화면에 경기장 테마의 배경 이미지가 적용되어 있으며, 투명도 레이어를 통해 깊이감을 더함.
- **상태이상:** `Stun`, `Bleed`, `Vulnerable`, `DefenseForbidden`, `Disarmed`.
- **상태이상:** `Stun`, `Vulnerable`, `DefenseForbidden`, `Disarmed`.
- **Bleed (출혈):** 공격이 방어도에 완전히 막히지 않고 HP 피해를 1 이상 입혀야 적용됨. 일단 적용되면 매 턴 시작 시 방어도를 무시하고 HP에 직접 피해를 입힘.
- **UI 알림 (Toast):** 하단 네비게이션을 가리지 않는 상단 `Overlay` 기반 알림 시스템.
### C. 데이터 및 로직 (Architecture)
@@ -114,6 +117,14 @@
## 4. 최근 주요 변경 사항 (Change Log)
- **[Feature] Dynamic Animations:** 공격 애니메이션을 페이즈(Start/Middle/End)별로 세분화하고, 각 단계마다 캐릭터 이미지를 변경하는 기능 구현. 리스크 수준(Risky vs Safe)에 따라 애니메이션 시퀀스와 이미지 변경 타이밍을 다르게 적용.
- **[Feature] Story Screen:** 게임 시작 시 세계관을 설명하는 `StoryScreen`을 추가하고, 캐릭터 선택 후 진입하도록 흐름 변경.
- **[Fix] Bleed & Selling & Prefixes:**
- **매직 아이템 접두사:** 생성 확률 100%로 상향.
- **판매 가격 UI:** 실제 판매가(60%) 표시로 수정.
- **출혈(Bleed):** 적 턴 시작 시 피해 미적용 버그 해결 및 "방어도에 막히면(HP 피해 0) 출혈 미적용" 로직 구현.
- **[Fix] Player Image Load:** 저장된 게임 로드 시 또는 새 게임 시작 시 플레이어 이미지가 누락되는 문제를 해결하고, 데이터 로드 로직을 강화.
- **[Refactor] UI Config:** `CharacterStatusCard`의 하드코딩된 스타일 값을 `ThemeConfig`로 추출하여 유지보수성 향상.
- **[Overhaul] Gladiator Theme & Balance Pass:** 게임의 테마를 '글래디에이터'로 전면 개편. 몬스터를 전부 '[별명] 이름' 형식의 인간형 검투사로 교체하고, 활과 같은 무기를 트라이던트, 플레일 등으로 교체. 이에 맞춰 아이템과 적 데이터 밸런스를 전체적으로 재조정.
- **[Refactor] Item Data System:** 소비용품 데이터를 JSON으로 이전하고, 모든 아이템을 Map 기반으로 조회하도록 리팩토링하여 성능 개선. 소비용품에는 접두사가 붙지 않도록 수정.
- **[Fix] Dual-Wielding Data:** 시스템에서 지원하지 않는 '무기 2개 장착' 적 데이터를 수정하고, 능력치 재조정을 통해 밸런스 보정.
+50
View File
@@ -0,0 +1,50 @@
# Bleeding Logic and Item Selling Fixes
## 1. Magic Item Prefix Chance
- **Issue:** Users felt that magic items often lacked prefixes, making them indistinguishable from normal items in terms of stats.
- **Fix:** Increased `ItemConfig.magicPrefixChance` from `0.5` (50%) to `1.0` (100%). Now, all items generated with `ItemRarity.magic` will guaranteed have a prefix (and associated stat boost).
## 2. Enemy Bleed Damage Bug
- **Issue:** Enemies were applying bleed to players, but when enemies themselves were bleeding, they took no damage at the start of their turn.
- **Fix:** Updated `BattleProvider._startEnemyTurn` to properly call `_processStartTurnEffects(enemy)`. This ensures that bleed damage is calculated and applied to the enemy's HP, and stun status is checked correctly.
## 3. Item Selling Price UI
- **Issue:** The "Sell Item" confirmation dialog displayed the item's *base price* instead of the actual *selling price* (which is 60% of base). This confused players into thinking they were getting full price, or that the system was broken when they received less gold.
- **Fix:** Updated `InventoryGridWidget` (`_showItemActionDialog` and `_showSellConfirmationDialog`) to calculate and display the final sell price: `floor(item.price * GameConfig.sellPriceMultiplier)`.
## 4. Bleed Application Logic
- **Issue:** Bleed status was being applied even when an attack was fully blocked by armor (0 HP damage).
- **Change:** Modified `BattleProvider._tryApplyStatusEffects` and its call site in `_processAttackImpact`.
- **New Logic:** Bleed status is now only applied if `damageToHp > 0`. If an attack is fully absorbed by armor, bleed will not be applied.
- **Note:** Once applied, bleed damage (at start of turn) continues to ignore armor and directly reduces HP, regardless of how much armor the target gains afterwards.
## 5. Dynamic Attack Animation Images
- **Feature:** Added support for changing character images during attack animation phases (Start, Middle, End).
- **Implementation:**
- Modified `BattleAnimationWidget` to accept callbacks for `onAnimationStart`, `onAnimationMiddle`, and `onAnimationEnd`.
- Updated `BattleScreen` to manage animation phase state and pass override images to `CharacterStatusCard`.
- Configured phase logic:
- **Risky:** Start -> ScaleUp -> Middle -> Dash -> End -> Impact.
- **Safe/Normal:** Start -> Middle -> Impact (No End phase).
- **Assets:** Applied `warrior_attack_1.png` for Start and `warrior_attack_2.png` for End phases.
## 6. Story Screen & Navigation
- **Feature:** Added a `StoryScreen` sequence after character selection and before the main game.
- **Details:** 3-page PageView with "Next" and "Skip" buttons. Uses `ResponsiveContainer` and consistent styling.
- **Navigation:** `CharacterSelectionScreen` -> `StoryScreen` -> `MainWrapper`.
## 7. Player Image & UI Fixes
- **Fix:** Corrected `PlayerTemplate.createCharacter` to pass the image path properly.
- **Fix:** Added logic in `BattleProvider.loadFromSave` to force update the player's image path from the latest data, fixing issues with old save files.
- **Refactor:** Extracted hardcoded UI constants in `CharacterStatusCard` to `ThemeConfig`.
## Files Changed
- `lib/game/config/item_config.dart`
- `lib/providers/battle_provider.dart`
- `lib/widgets/inventory/inventory_grid_widget.dart`
- `lib/screens/battle_screen.dart`
- `lib/widgets/battle/battle_animation_widget.dart`
- `lib/widgets/battle/character_status_card.dart`
- `lib/screens/story_screen.dart`
- `lib/game/data/player_table.dart`
- `lib/game/config/theme_config.dart`