using ODMO.Commons.Enums;
using ODMO.Commons.Enums.ClientEnums;
using ODMO.Commons.Models.Asset;
using ODMO.Commons.Models.Character;
using System.Text.Json.Serialization;
namespace ODMO.Commons.Models.Digimon
{
public sealed partial class DigimonModel
{
//Temp
public DateTime tempUpdating { get; set; } = DateTime.Now;
public bool tempRecalculate { get; set; }
public bool tempCalculating { get; set; }
///
/// Unique sequential identifier.
///
public long Id { get; private set; }
///
/// Digimon base type.
///
public int BaseType { get; private set; }
///
/// Digimon current model.
///
public int Model { get; private set; }
///
/// Digimon current level.
///
public byte Level { get; private set; }
///
/// Digimon name.
///
public string Name { get; private set; }
///
/// Digimon current size.
///
public short Size { get; private set; }
///
/// Digimon current experience.
///
public long CurrentExperience { get; private set; }
///
/// Digimon current skill experience.
///
public long CurrentSkillExperience { get; private set; }
///
/// Digimon current transcendence experience.
///
public long TranscendenceExperience { get; private set; }
///
/// Digimon creation date.
///
public DateTime CreateDate { get; private set; }
public DateTime LastSkillsCheck { get; private set; }
///
/// Digimon hatch grade.
///
public DigimonHatchGradeEnum HatchGrade { get; private set; }
///
/// Digimon current type.
///
public int CurrentType { get; private set; }
///
/// Digimon friendship value.
///
public byte Friendship { get; private set; }
///
/// Digimon active buff list.
///
public DigimonBuffListModel BuffList { get; private set; }
public DigimonDebuffListModel DebuffList { get; private set; }
///
/// Digimon digiclone details.
///
public DigimonDigicloneModel Digiclone { get; private set; }
///
/// Digimon available evolutions.
///
public List Evolutions { get; private set; }
///
/// Digimon attribute experience.
///
public DigimonAttributeExperienceModel AttributeExperience { get; private set; }
///
/// Digimon current location.
///
public DigimonLocationModel Location { get; set; }
///
/// Digimon evolution status.
///
public StatusAssetModel BaseStatus { get; private set; }
///
/// Digimon base information.
///
public DigimonBaseInfoAssetModel BaseInfo { get; private set; }
///
/// Digimon seal status list.
///
public List SealStatusList { get; private set; } = new();
///
/// Digimon title status.
///
public TitleStatusAssetModel? TitleStatus { get; private set; }
public byte Slot { get; private set; }
//Dynamic
public bool AutoAttack { get; private set; }
public bool HasActiveSkills()
{
return Evolutions.Any(x => x.Type > 0 && x.Skills.Any(s => s.Duration > 0));
}
public DateTime LastHitTime { get; private set; }
public DateTime EndAttacking { get; private set; }
public DateTime EndCasting { get; private set; }
public Location ViewLocation { get; private set; }
public Location BeforeEvent { get; private set; }
public ConditionEnum CurrentCondition { get; private set; }
public ConditionEnum PreviousCondition { get; private set; }
[JsonIgnore]
public CharacterModel? Character { get; private set; }
public long? CharacterId { get; private set; }
public DigimonModel()
{
BuffList = new DigimonBuffListModel();
Digiclone = new DigimonDigicloneModel();
Evolutions = new List();
AttributeExperience = new DigimonAttributeExperienceModel();
ViewLocation = new Location();
BeforeEvent = new Location();
BaseStatus = new StatusAssetModel();
DebuffList = new DigimonDebuffListModel();
CurrentCondition = ConditionEnum.Default;
}
}
}