141 lines
4.0 KiB
C#
141 lines
4.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Pf2e.Database.Model.Base;
|
|
using Pf2e.Database.Model.Common.I18n;
|
|
using Pf2e.Database.Model.Enum;
|
|
using Pf2e.Database.Model.Structure.SpellRelation;
|
|
|
|
namespace Pf2e.Database.Model.Structure;
|
|
|
|
/// <summary>
|
|
/// Заклинание.
|
|
/// </summary>
|
|
[EntityOfType(EntityType.Spell)]
|
|
public class Spell : IEntity
|
|
{
|
|
/// <inheritdoc/>
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
[Column(Order = 1)]
|
|
[Comment("Идентификатор")]
|
|
public int Id { get; set; }
|
|
|
|
/// <inheritdoc/>
|
|
public Entity Entity { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Уровень заклинания.
|
|
/// </summary>
|
|
[Column(Order = 2)]
|
|
public int Level { get; set; }
|
|
|
|
/// <summary>
|
|
/// Является ли заклинание фокусом.
|
|
/// </summary>
|
|
[Column(Order = 3)]
|
|
[Comment("Фокус?")]
|
|
public bool IsFocus { get; set; }
|
|
|
|
/// <summary>
|
|
/// Количество действий, необходимых для применения заклинания.
|
|
/// </summary>
|
|
[Column(Order = 4)]
|
|
[Comment("Количество действий")]
|
|
public ActionEnum Actions { get; set; } = ActionEnum.Other;
|
|
|
|
/// <summary>
|
|
/// Время длительности заклинания в секундах.
|
|
/// </summary>
|
|
[Column(Order = 5)]
|
|
[MaxLength(255)]
|
|
[Comment("Время длительности заклинания")]
|
|
public int? Duration { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Дальность заклинания в футах.
|
|
/// </summary>
|
|
[Column(Order = 6)]
|
|
[Comment("Дальность заклинания")]
|
|
public int Range { get; set; }
|
|
|
|
/// <summary>
|
|
/// Традиции заклинания.
|
|
/// </summary>
|
|
[Column(Order = 7)]
|
|
[Comment("Традиции заклинания")]
|
|
public SpellTradition[] Traditions { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Элементы заклинания.
|
|
/// </summary>
|
|
[Column(Order = 8)]
|
|
[Comment("Элементы заклинания")]
|
|
public ElementEnum[] Elements { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Триггер заклинания.
|
|
/// </summary>
|
|
[Column(Order = 9)]
|
|
[Comment("Триггер заклинания")]
|
|
public LocaleString? Trigger { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Цель заклинания.
|
|
/// </summary>
|
|
[Column(Order = 10)]
|
|
[Comment("Цель заклинания")]
|
|
public LocaleString? Target { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Стоимость заклинания.
|
|
/// </summary>
|
|
[Column(Order = 11)]
|
|
[Comment("Стоимость заклинания")]
|
|
public LocaleString? Cost { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Требования к заклинанию.
|
|
/// </summary>
|
|
[Column(Order = 12)]
|
|
[Comment("Требования к заклинанию")]
|
|
public LocaleString? Requirement { get; set; } = null;
|
|
|
|
/*
|
|
[Column(Order = 4)]
|
|
public bool Counteraction { get; set; }
|
|
|
|
[Column(Order = 5)]
|
|
public bool Sustained { get; set; }
|
|
|
|
[Column(Order = 7)]
|
|
[MaxLength(255)]
|
|
public string Range { get; set; } = null!;
|
|
|
|
[Column(Order = 8)]
|
|
[MaxLength(255)]
|
|
public string Requirements { get; set; } = null!;
|
|
|
|
[Column(Order = 9)]
|
|
[MaxLength(255)]
|
|
public string Target { get; set; } = null!;
|
|
|
|
[Column(Order = 10)]
|
|
[MaxLength(255)]
|
|
public string Time { get; set; } = null!;
|
|
|
|
[Column(Order = 11)]
|
|
public bool CanHeightening { get; set; }
|
|
*/
|
|
|
|
/// <summary>
|
|
/// Коллекция области заклинания.
|
|
/// </summary>
|
|
public ICollection<SpellArea> SpellAreas { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Коллекция защиты от заклинания.
|
|
/// </summary>
|
|
public ICollection<SpellDefense> SpellDefenses { get; set; } = new List<SpellDefense>();
|
|
}
|