Refactor skill allocation to upgrade; implement skill requirements and resource checks; remove experience from Pet model; update README for skill tree progress

This commit is contained in:
2025-02-08 22:46:19 -03:00
parent f553196ca0
commit 653cc451d2
13 changed files with 723 additions and 355 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace PetCompanion.Models
@@ -23,16 +24,30 @@ namespace PetCompanion.Models
public string Name { get; set; }
public string Description { get; set; }
public SkillType Type { get; set; }
public int PointsCost { get; set; }
public string Icon { get; set; }
public List<int>? SkillsIdRequired { get; set; }
public virtual ICollection<SkillRequirement> SkillRequirements { get; set; }
public virtual ICollection<SkillEffect> Effects { get; set; }
[JsonIgnore]
public virtual ICollection<PetSkill> PetSkills { get; set; }
}
public class SkillRequirement
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; set; }
public int SkillId { get; set; }
public string Resource { get; set; }
public int Cost { get; set; }
[JsonIgnore]
public virtual Skill Skill { get; set; }
}
public class SkillEffect
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; set; }
public int SkillId { get; set; }