game/lib/game/model/effect_event.dart

37 lines
1.2 KiB
Dart

import '../enums.dart';
import 'entity.dart'; // Import Character entity
enum EffectTarget { player, enemy }
class EffectEvent {
final String id;
final ActionType type; // attack, defend
final RiskLevel risk;
final EffectTarget target; // 이펙트가 표시될 위치의 대상
final BattleFeedbackType? feedbackType; // 새로운 피드백 타입
// New fields for impact logic
final Character? attacker;
final Character? targetEntity; // 실제 피해를 받는 캐릭터
final int? damageValue; // 공격 시 데미지 값
final bool? isSuccess; // 성공 여부 (Missed or Failed가 아닌 경우)
final int? armorGained; // 방어 시 얻는 방어도
final bool triggersTurnChange; // 턴 전환 트리거 여부
final bool isVisualOnly; // 로직 적용 없이 시각적 효과만 발생시킬지 여부
EffectEvent({
required this.id,
required this.type,
required this.risk,
required this.target,
this.feedbackType, // feedbackType 필드를 생성자에 추가
this.attacker,
this.targetEntity,
this.damageValue,
this.isSuccess,
this.armorGained,
this.triggersTurnChange = true,
this.isVisualOnly = false,
});
}