diff --git a/lib/src/core/engine/combat_tick_service.dart b/lib/src/core/engine/combat_tick_service.dart index ca10a1f..156a007 100644 --- a/lib/src/core/engine/combat_tick_service.dart +++ b/lib/src/core/engine/combat_tick_service.dart @@ -7,6 +7,7 @@ import 'package:asciineverdie/src/core/model/combat_state.dart'; import 'package:asciineverdie/src/core/model/combat_stats.dart'; import 'package:asciineverdie/src/core/model/game_state.dart'; import 'package:asciineverdie/src/core/model/monster_combat_stats.dart'; +import 'package:asciineverdie/src/core/model/potion.dart'; import 'package:asciineverdie/src/core/model/skill.dart'; import 'package:asciineverdie/src/core/util/deterministic_random.dart'; diff --git a/lib/src/features/game/game_play_screen.dart b/lib/src/features/game/game_play_screen.dart index 4993a27..c878a90 100644 --- a/lib/src/features/game/game_play_screen.dart +++ b/lib/src/features/game/game_play_screen.dart @@ -935,8 +935,6 @@ class _GamePlayScreenState extends State Expanded( child: PotionInventoryPanel( inventory: state.potionInventory, - usedInBattle: - state.progress.currentCombat?.usedPotionTypes ?? const {}, ), ), diff --git a/lib/src/features/game/layouts/mobile_carousel_layout.dart b/lib/src/features/game/layouts/mobile_carousel_layout.dart index ee67205..08e6fb7 100644 --- a/lib/src/features/game/layouts/mobile_carousel_layout.dart +++ b/lib/src/features/game/layouts/mobile_carousel_layout.dart @@ -754,9 +754,6 @@ class _MobileCarouselLayoutState extends State { inventory: state.inventory, potionInventory: state.potionInventory, encumbrance: state.progress.encumbrance, - usedPotionTypes: - state.progress.currentCombat?.usedPotionTypes ?? - const {}, ), // 2: 장비 diff --git a/lib/src/features/game/pages/inventory_page.dart b/lib/src/features/game/pages/inventory_page.dart index e7a1ac9..0fdab7b 100644 --- a/lib/src/features/game/pages/inventory_page.dart +++ b/lib/src/features/game/pages/inventory_page.dart @@ -16,13 +16,11 @@ class InventoryPage extends StatelessWidget { required this.inventory, required this.potionInventory, required this.encumbrance, - this.usedPotionTypes = const {}, }); final Inventory inventory; final PotionInventory potionInventory; final ProgressBarState encumbrance; - final Set usedPotionTypes; @override Widget build(BuildContext context) { @@ -41,7 +39,6 @@ class InventoryPage extends StatelessWidget { flex: 2, child: PotionInventoryPanel( inventory: potionInventory, - usedInBattle: usedPotionTypes, ), ), diff --git a/lib/src/features/game/widgets/potion_inventory_panel.dart b/lib/src/features/game/widgets/potion_inventory_panel.dart index 8218462..1f42e32 100644 --- a/lib/src/features/game/widgets/potion_inventory_panel.dart +++ b/lib/src/features/game/widgets/potion_inventory_panel.dart @@ -12,11 +12,9 @@ class PotionInventoryPanel extends StatelessWidget { const PotionInventoryPanel({ super.key, required this.inventory, - this.usedInBattle = const {}, }); final PotionInventory inventory; - final Set usedInBattle; @override Widget build(BuildContext context) { @@ -43,7 +41,6 @@ class PotionInventoryPanel extends StatelessWidget { return _PotionRow( potion: entry.potion, quantity: entry.quantity, - isUsedThisBattle: usedInBattle.contains(entry.potion.type), ); }, ); @@ -88,69 +85,57 @@ class _PotionRow extends StatelessWidget { const _PotionRow({ required this.potion, required this.quantity, - this.isUsedThisBattle = false, }); final Potion potion; final int quantity; - final bool isUsedThisBattle; @override Widget build(BuildContext context) { final color = _getPotionColor(); - final opacity = isUsedThisBattle ? 0.5 : 1.0; return Padding( padding: const EdgeInsets.symmetric(vertical: 2), - child: Opacity( - opacity: opacity, - child: Row( - children: [ - // 물약 아이콘 - _PotionIcon(type: potion.type, tier: potion.tier), - const SizedBox(width: 4), + child: Row( + children: [ + // 물약 아이콘 + _PotionIcon(type: potion.type, tier: potion.tier), + const SizedBox(width: 4), - // 물약 이름 (번역 적용) - Expanded( - child: Text( - l10n.translateSpell(potion.name), - style: TextStyle( - fontSize: 16, - color: color, - fontWeight: FontWeight.w500, - ), - overflow: TextOverflow.ellipsis, + // 물약 이름 (번역 적용) + Expanded( + child: Text( + l10n.translateSpell(potion.name), + style: TextStyle( + fontSize: 16, + color: color, + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + + // 회복량 표시 + _HealBadge(potion: potion), + const SizedBox(width: 4), + + // 수량 + Container( + padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), + decoration: BoxDecoration( + color: color.withValues(alpha: 0.2), + borderRadius: BorderRadius.circular(8), + ), + child: Text( + 'x$quantity', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.bold, + color: color, ), ), - - // 회복량 표시 - _HealBadge(potion: potion), - const SizedBox(width: 4), - - // 수량 - Container( - padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), - decoration: BoxDecoration( - color: color.withValues(alpha: 0.2), - borderRadius: BorderRadius.circular(8), - ), - child: Text( - 'x$quantity', - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.bold, - color: color, - ), - ), - ), - - // 전투 중 사용 불가 표시 - if (isUsedThisBattle) ...[ - const SizedBox(width: 4), - const Icon(Icons.block, size: 12, color: Colors.grey), - ], - ], - ), + ), + ], ), ); }