refactor(engine): 포션/진행 서비스 개선
- PotionService 로직 개선 - ProgressService 몬스터 등급 지원
This commit is contained in:
@@ -14,6 +14,7 @@ import 'package:asciineverdie/src/core/model/equipment_item.dart';
|
||||
import 'package:asciineverdie/src/core/model/equipment_slot.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/monster_grade.dart';
|
||||
import 'package:asciineverdie/src/core/model/potion.dart';
|
||||
import 'package:asciineverdie/src/core/model/pq_config.dart';
|
||||
import 'package:asciineverdie/src/core/model/skill.dart';
|
||||
@@ -591,6 +592,7 @@ class ProgressService {
|
||||
monsterBaseName: monsterResult.baseName,
|
||||
monsterPart: monsterResult.part,
|
||||
monsterLevel: monsterResult.level,
|
||||
monsterGrade: monsterResult.grade,
|
||||
),
|
||||
currentCombat: combatState,
|
||||
);
|
||||
@@ -646,6 +648,7 @@ class ProgressService {
|
||||
monsterBaseName: 'Glitch God',
|
||||
monsterPart: '*', // 특수 전리품
|
||||
monsterLevel: glitchGod.level,
|
||||
monsterGrade: MonsterGrade.boss, // 최종 보스는 항상 boss 등급
|
||||
),
|
||||
currentCombat: combatState,
|
||||
);
|
||||
@@ -963,8 +966,12 @@ class ProgressService {
|
||||
// 물약 드랍 시도
|
||||
final potionService = const PotionService();
|
||||
final rng = resultState.rng;
|
||||
final monsterLevel = taskInfo.monsterLevel ?? resultState.traits.level;
|
||||
final monsterGrade = taskInfo.monsterGrade ?? MonsterGrade.normal;
|
||||
final (updatedPotionInventory, droppedPotion) = potionService.tryPotionDrop(
|
||||
playerLevel: resultState.traits.level,
|
||||
monsterLevel: monsterLevel,
|
||||
monsterGrade: monsterGrade,
|
||||
inventory: resultState.potionInventory,
|
||||
roll: rng.nextInt(100),
|
||||
typeRoll: rng.nextInt(100),
|
||||
|
||||
Reference in New Issue
Block a user