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

@@ -105,9 +105,6 @@ namespace PetCompanion.Migrations
b.Property<int>("Class")
.HasColumnType("INTEGER");
b.Property<int>("Experience")
.HasColumnType("INTEGER");
b.Property<DateTime>("GatherActionSince")
.HasColumnType("TEXT");
@@ -133,9 +130,6 @@ namespace PetCompanion.Migrations
b.Property<int>("PetGatherAction")
.HasColumnType("INTEGER");
b.Property<int>("SkillPoints")
.HasColumnType("INTEGER");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
@@ -247,9 +241,6 @@ namespace PetCompanion.Migrations
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("PointsCost")
.HasColumnType("INTEGER");
b.PrimitiveCollection<string>("SkillsIdRequired")
.HasColumnType("TEXT");
@@ -267,7 +258,6 @@ namespace PetCompanion.Migrations
Description = "Increases maximum health of your pet, making it more resilient.",
Icon = "❤",
Name = "Vitality Mastery",
PointsCost = 1,
Type = 0
},
new
@@ -276,7 +266,6 @@ namespace PetCompanion.Migrations
Description = "Increases maximum intelligence of your pet, improving its learning capabilities.",
Icon = "🧠",
Name = "Mind Enhancement",
PointsCost = 1,
Type = 0
},
new
@@ -285,7 +274,6 @@ namespace PetCompanion.Migrations
Description = "Increases maximum strength of your pet, making it more powerful.",
Icon = "💪",
Name = "Strength Training",
PointsCost = 1,
Type = 0
},
new
@@ -294,7 +282,6 @@ namespace PetCompanion.Migrations
Description = "Increases maximum charisma of your pet, making it more charming.",
Icon = "🎭",
Name = "Charisma Boost",
PointsCost = 1,
Type = 0
},
new
@@ -303,7 +290,6 @@ namespace PetCompanion.Migrations
Description = "Increases luck of your pet, making it more fortunate to find rare items.",
Icon = "🍀",
Name = "Luck of the Draw",
PointsCost = 1,
SkillsIdRequired = "[4]",
Type = 0
},
@@ -313,7 +299,6 @@ namespace PetCompanion.Migrations
Description = "Increases agility of your pet, making it faster in combat.",
Icon = "🏃",
Name = "Agility Training",
PointsCost = 1,
SkillsIdRequired = "[3]",
Type = 0
},
@@ -323,9 +308,17 @@ namespace PetCompanion.Migrations
Description = "Increases perception of your pet, making it more aware of its surroundings.",
Icon = "👀",
Name = "Perception Boost",
PointsCost = 1,
SkillsIdRequired = "[2]",
Type = 0
},
new
{
Id = 8,
Description = "Increases the amount of resources gathered by your pet.",
Icon = "📦",
Name = "Resourcefulness",
SkillsIdRequired = "[5,6,7]",
Type = 1
});
});
@@ -522,6 +515,153 @@ namespace PetCompanion.Migrations
SkillId = 7,
Tier = 3,
Value = 3m
},
new
{
Id = 22,
Effect = "Resourcefulness",
SkillId = 8,
Tier = 1,
Value = 1m
},
new
{
Id = 23,
Effect = "Resourcefulness",
SkillId = 8,
Tier = 2,
Value = 2m
},
new
{
Id = 24,
Effect = "Resourcefulness",
SkillId = 8,
Tier = 3,
Value = 3m
});
});
modelBuilder.Entity("PetCompanion.Models.SkillRequirement", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Cost")
.HasColumnType("INTEGER");
b.Property<string>("Resource")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("SkillId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SkillId");
b.ToTable("SkillRequirement");
b.HasData(
new
{
Id = 1,
Cost = 100,
Resource = "Wisdom",
SkillId = 1
},
new
{
Id = 2,
Cost = 150,
Resource = "Food",
SkillId = 1
},
new
{
Id = 3,
Cost = 150,
Resource = "Wisdom",
SkillId = 2
},
new
{
Id = 4,
Cost = 100,
Resource = "Gold",
SkillId = 3
},
new
{
Id = 5,
Cost = 150,
Resource = "Food",
SkillId = 3
},
new
{
Id = 6,
Cost = 200,
Resource = "Wisdom",
SkillId = 4
},
new
{
Id = 7,
Cost = 200,
Resource = "Gold",
SkillId = 5
},
new
{
Id = 8,
Cost = 200,
Resource = "Gold",
SkillId = 6
},
new
{
Id = 9,
Cost = 100,
Resource = "Gold",
SkillId = 7
},
new
{
Id = 10,
Cost = 100,
Resource = "Junk",
SkillId = 7
},
new
{
Id = 11,
Cost = 500,
Resource = "Gold",
SkillId = 8
},
new
{
Id = 12,
Cost = 500,
Resource = "Junk",
SkillId = 8
},
new
{
Id = 13,
Cost = 300,
Resource = "Wisdom",
SkillId = 8
},
new
{
Id = 14,
Cost = 300,
Resource = "Food",
SkillId = 8
});
});
@@ -603,6 +743,17 @@ namespace PetCompanion.Migrations
b.Navigation("Skill");
});
modelBuilder.Entity("PetCompanion.Models.SkillRequirement", b =>
{
b.HasOne("PetCompanion.Models.Skill", "Skill")
.WithMany("SkillRequirements")
.HasForeignKey("SkillId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Skill");
});
modelBuilder.Entity("PetCompanion.Models.Pet", b =>
{
b.Navigation("EquippedItemsList");
@@ -624,6 +775,8 @@ namespace PetCompanion.Migrations
b.Navigation("Effects");
b.Navigation("PetSkills");
b.Navigation("SkillRequirements");
});
#pragma warning restore 612, 618
}