mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-18 03:13:46 +00:00
feat: 2e save character initial implementation WIP
2e is hidden behind url navigation hiding, so hoping that nobody found it yet. Note: DB migration make this commit a bit risky!
This commit is contained in:
@@ -4,6 +4,9 @@ using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 1st edition character sheet
|
||||
/// </summary>
|
||||
public class V1Karakter
|
||||
{
|
||||
[Key] public Guid Id { get; set; }
|
||||
@@ -15,8 +18,8 @@ public class V1Karakter
|
||||
public double? Kor { get; set; }
|
||||
public Jellem Jellem { get; set; } = Jellem.Semleges;
|
||||
public string? Isten { get; set; }
|
||||
public Faj Faj { get; set; } = Faj.Ember;
|
||||
public Osztaly Osztaly { get; set; }
|
||||
public Faj1E Faj { get; set; } = Faj1E.Ember;
|
||||
public Osztaly1E Osztaly { get; set; }
|
||||
public byte Ero { get; set; }
|
||||
public byte Ugyesseg { get; set; }
|
||||
public byte Egeszseg { get; set; }
|
||||
|
||||
@@ -9,7 +9,7 @@ public class V1KarakterKepzettseg
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
public Kepzettseg Kepzettseg { get; set; }
|
||||
public Kepzettseg1E Kepzettseg { get; set; }
|
||||
public bool IsTolvajKepzettseg { get; set; } = false;
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
|
||||
@@ -19,6 +19,8 @@ public class V1Szintlepes
|
||||
|
||||
public byte HpRoll { get; set; }
|
||||
public Tulajdonsag? TulajdonsagNoveles { get; set; }
|
||||
|
||||
// used for both Kaloz/Tengeresz and Harcos
|
||||
public string? FegyverSpecializacio { get; set; }
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V2Felszereles
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
|
||||
public string TargyId { get; set; }
|
||||
public bool IsFegyver { get; set; } = true;
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V2Karakter Karakter { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 2nd edition character sheet
|
||||
/// </summary>
|
||||
public class V2Karakter
|
||||
{
|
||||
[Key] public Guid Id { get; set; }
|
||||
public bool IsPublic { get; set; } = false;
|
||||
public int? OwnerUserId { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
public string? Nem { get; set; }
|
||||
public double? Kor { get; set; }
|
||||
public Jellem Jellem { get; set; } = Jellem.Semleges;
|
||||
public string? Isten { get; set; }
|
||||
public Faj2E Faj { get; set; } = Faj2E.Ember;
|
||||
public byte Ero { get; set; }
|
||||
public byte Ugyesseg { get; set; }
|
||||
public byte Egeszseg { get; set; }
|
||||
public byte Intelligencia { get; set; }
|
||||
public byte Bolcsesseg { get; set; }
|
||||
public byte Karizma { get; set; }
|
||||
public byte Szint { get; set; } = 1;
|
||||
|
||||
public string? Pancel { get; set; }
|
||||
public string? Pajzs { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId))]
|
||||
public ApplicationUser? OwnerUser { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V2KarakterKepzettseg.Karakter))]
|
||||
public virtual IEnumerable<V2KarakterKepzettseg> KarakterKepzettsegek { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V2Szintlepes.Karakter))]
|
||||
public virtual IEnumerable<V2Szintlepes> Szintlepesek { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V2Felszereles.Karakter))]
|
||||
public virtual IEnumerable<V2Felszereles> Felszereles { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V2KarakterKepzettseg
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
public Kepzettseg2E Kepzettseg { get; set; }
|
||||
public bool IsTolvajKepzettseg { get; set; } = false;
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V2Karakter Karakter { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V2Szintlepes
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
|
||||
// this is also used for ordering the level ups
|
||||
public byte KarakterSzint { get; set; }
|
||||
|
||||
public Osztaly2E Osztaly { get; set; }
|
||||
|
||||
public byte HpRoll { get; set; }
|
||||
public Tulajdonsag? TulajdonsagNoveles { get; set; }
|
||||
|
||||
// used for both Kaloz/Tengeresz and Harcos
|
||||
public string? FegyverSpecializacio { get; set; }
|
||||
|
||||
// for the 9th level Tolvaj specialty
|
||||
public Kepzettseg2E? TolvajExtraKepzettseg { get; set; }
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V2Karakter Karakter { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user