feat(arena): 아레나 모델 추가

- ArenaMatch: 아레나 매치 상태 모델
- HallOfFame: 명예의 전당 모델 추가
- MonsterCombatStats: 아레나용 스탯 생성 메서드 추가
This commit is contained in:
JiWoong Sul
2026-01-06 17:54:51 +09:00
parent be56825ef9
commit 4c68b3c7fb
3 changed files with 251 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
import 'package:asciineverdie/src/core/model/equipment_slot.dart';
import 'package:asciineverdie/src/core/model/hall_of_fame.dart';
/// 아레나 대전 정보
///
/// 도전자와 상대의 정보, 베팅 슬롯을 포함
class ArenaMatch {
const ArenaMatch({
required this.challenger,
required this.opponent,
required this.bettingSlot,
});
/// 도전자 (내 캐릭터)
final HallOfFameEntry challenger;
/// 상대 캐릭터
final HallOfFameEntry opponent;
/// 베팅 슬롯 (같은 슬롯 교환)
final EquipmentSlot bettingSlot;
/// 도전자 순위
int get challengerRank => 0; // ArenaService에서 계산
/// 상대 순위
int get opponentRank => 0; // ArenaService에서 계산
}
/// 아레나 대전 결과
class ArenaMatchResult {
const ArenaMatchResult({
required this.match,
required this.isVictory,
required this.turns,
required this.updatedChallenger,
required this.updatedOpponent,
});
/// 대전 정보
final ArenaMatch match;
/// 도전자 승리 여부
final bool isVictory;
/// 전투 턴 수
final int turns;
/// 장비 교환 후 업데이트된 도전자
final HallOfFameEntry updatedChallenger;
/// 장비 교환 후 업데이트된 상대
final HallOfFameEntry updatedOpponent;
}
/// 아레나 전투 턴 (애니메이션용)
class ArenaCombatTurn {
ArenaCombatTurn({
this.challengerDamage,
this.opponentDamage,
required this.challengerHp,
required this.opponentHp,
required this.challengerHpMax,
required this.opponentHpMax,
this.isChallengerCritical = false,
this.isOpponentCritical = false,
this.isChallengerEvaded = false,
this.isOpponentEvaded = false,
this.isChallengerBlocked = false,
this.isOpponentBlocked = false,
}) : timestamp = DateTime.now().microsecondsSinceEpoch;
/// 턴 식별용 타임스탬프
final int timestamp;
/// 도전자가 입힌 데미지 (null이면 공격 안 함)
final int? challengerDamage;
/// 상대가 입힌 데미지 (null이면 공격 안 함)
final int? opponentDamage;
/// 도전자 현재 HP
final int challengerHp;
/// 상대 현재 HP
final int opponentHp;
/// 도전자 최대 HP
final int challengerHpMax;
/// 상대 최대 HP
final int opponentHpMax;
/// 도전자 크리티컬 여부
final bool isChallengerCritical;
/// 상대 크리티컬 여부
final bool isOpponentCritical;
/// 도전자 회피 여부
final bool isChallengerEvaded;
/// 상대 회피 여부
final bool isOpponentEvaded;
/// 도전자 블록 여부
final bool isChallengerBlocked;
/// 상대 블록 여부
final bool isOpponentBlocked;
}