- game_statistics에서 cumulative_statistics, session_statistics 분리 - task_info import 경로 업데이트
68 lines
1.9 KiB
Dart
68 lines
1.9 KiB
Dart
import 'package:asciineverdie/src/shared/animation/monster_size.dart';
|
|
import 'package:asciineverdie/src/core/model/monster_grade.dart';
|
|
|
|
/// 태스크 타입 (원본 fTask.Caption 값들에 대응)
|
|
enum TaskType {
|
|
neutral, // heading 등 일반 이동
|
|
kill, // 몬스터 처치
|
|
load, // 로딩/초기화
|
|
plot, // 플롯 진행
|
|
market, // 시장으로 이동 중
|
|
sell, // 아이템 판매 중
|
|
buying, // 장비 구매 중
|
|
}
|
|
|
|
/// 태스크 정보 (Task Info)
|
|
class TaskInfo {
|
|
const TaskInfo({
|
|
required this.caption,
|
|
required this.type,
|
|
this.monsterBaseName,
|
|
this.monsterPart,
|
|
this.monsterLevel,
|
|
this.monsterGrade,
|
|
this.monsterSize,
|
|
});
|
|
|
|
final String caption;
|
|
final TaskType type;
|
|
|
|
/// 킬 태스크의 몬스터 기본 이름 (형용사 제외, 예: "Goblin")
|
|
final String? monsterBaseName;
|
|
|
|
/// 킬 태스크의 전리품 부위 (예: "claw", "tail", "*"는 WinItem)
|
|
final String? monsterPart;
|
|
|
|
/// 킬 태스크의 몬스터 레벨 (전투 스탯 계산용)
|
|
final int? monsterLevel;
|
|
|
|
/// 킬 태스크의 몬스터 등급 (Normal/Elite/Boss)
|
|
final MonsterGrade? monsterGrade;
|
|
|
|
/// 킬 태스크의 몬스터 사이즈 (애니메이션 크기 결정용, Act 기반)
|
|
final MonsterSize? monsterSize;
|
|
|
|
factory TaskInfo.empty() =>
|
|
const TaskInfo(caption: '', type: TaskType.neutral);
|
|
|
|
TaskInfo copyWith({
|
|
String? caption,
|
|
TaskType? type,
|
|
String? monsterBaseName,
|
|
String? monsterPart,
|
|
int? monsterLevel,
|
|
MonsterGrade? monsterGrade,
|
|
MonsterSize? monsterSize,
|
|
}) {
|
|
return TaskInfo(
|
|
caption: caption ?? this.caption,
|
|
type: type ?? this.type,
|
|
monsterBaseName: monsterBaseName ?? this.monsterBaseName,
|
|
monsterPart: monsterPart ?? this.monsterPart,
|
|
monsterLevel: monsterLevel ?? this.monsterLevel,
|
|
monsterGrade: monsterGrade ?? this.monsterGrade,
|
|
monsterSize: monsterSize ?? this.monsterSize,
|
|
);
|
|
}
|
|
}
|