Больше работы над парсингом заклинаний

This commit is contained in:
2025-05-06 01:23:34 +04:00
parent c1b70a12eb
commit 5693fa8ce8
13 changed files with 279 additions and 239 deletions
+17 -9
View File
@@ -24,20 +24,31 @@ public class Spell : IEntity
public ActionEnum Actions { get; set; } = ActionEnum.Other;
[Column(Order = 4)]
[MaxLength(255)]
public int? Duration { get; set; } = null;
[Column(Order = 5)]
public bool IsFocus { get; set; }
// ---
[Column(Order = 6)]
public SpellTradition[] Traditions { get; set; } = [];
[Column(Order = 6)]
public int Range { get; set; }
[Column(Order = 7)]
public LocaleString? Trigger { get; set; } = null;
[Column(Order = 8)]
public LocaleString? Target { get; set; } = null;
/*
[Column(Order = 4)]
public bool Counteraction { get; set; }
[Column(Order = 5)]
public bool Sustained { get; set; }
[Column(Order = 6)]
[MaxLength(255)]
public string Duration { get; set; } = null!;
[Column(Order = 7)]
[MaxLength(255)]
public string Range { get; set; } = null!;
@@ -56,14 +67,11 @@ public class Spell : IEntity
[Column(Order = 11)]
public bool CanHeightening { get; set; }
// ---
*/
public virtual ICollection<SpellArea> SpellAreas { get; set; } = [];
public virtual SpellRitual? SpellRitual { get; set; }
public virtual ICollection<SpellDamage> SpellDamages { get; set; } = new List<SpellDamage>();
public virtual ICollection<SpellDefense> SpellDefenses { get; set; } = new List<SpellDefense>();
}
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Common.I18n;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure.SpellRelation;
@@ -7,7 +8,7 @@ namespace Pf2eModel.Model.Structure.SpellRelation;
public class SpellArea
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column(Order = 1)]
public int Id { get; set; }
@@ -16,13 +17,10 @@ public class SpellArea
[Column(Order = 3)]
[MaxLength(255)]
public string? Details { get; set; }
public LocaleString? Details { get; set; }
[Column(Order = 4)]
public SpellAreaType Type { get; set; }
[Column(Order = 5)]
public int Value { get; set; }
public virtual Spell Spell { get; set; } = null!;
}