public Attack(BattleParticipant source, AttackType type, IEnumerable <EquipmentInfo> equipmentUsed, IEnumerable <Hit> hits) { Source = source; SourceHP = source?.ToHP; Type = type; EquipmentUsed = equipmentUsed.ToArray(); Hits = hits.ToArray(); }
public Hit(BattleParticipant source, BattleParticipant target, RawHit raw) { Target = target; IsCritical = raw.IsCritical; IsProtection = raw.IsProtection; Damage = raw.Damage; FromHP = target.ToHP; source?.DoDamage(Damage); (ToHP, Recover) = target.GetDamage(Damage); }