factored the character system - not funtional yet

This commit is contained in:
Sebastian Bularca
2026-03-22 14:46:19 +01:00
parent 00bb430a7f
commit 0f0189726e
36 changed files with 639 additions and 513 deletions

View File

@@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace Nox.Game {
public class PartyCreatorModel {
private readonly ICharacterFactory characterFactory;
@@ -6,50 +8,60 @@ namespace Nox.Game {
this.characterFactory = characterFactory;
this.partyFactory = partyFactory;
}
public PartyData CreatePartyForNewRun(int companionCount) {
public PartyDefinition CreatePartyForNewRun(int companionCount) {
var protagonist = characterFactory.CreateCustomProtagonist(new CustomCharacterCreationRequest {
id = "protagonist",
displayName = "The Warden",
mightPoints = 4,
reflexPoints = 3,
knowledgePoints = 3,
startingPerkIds = new System.Collections.Generic.List<string> { "iron-will" }
attributes = new EntityAttributes(),
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
});
CharacterTemplate[] companionTemplates = {
new() {
id = "companion-bruiser",
displayName = "Rook",
attributes = new CharacterAttributes { might = 5, reflex = 2, knowledge = 1 },
startingPerkIds = new System.Collections.Generic.List<string> { "steadfast" }
attributes = new EntityAttributes { might = 5, reflex = 2, knowledge = 1 },
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
},
new() {
id = "companion-scout",
displayName = "Sable",
attributes = new CharacterAttributes { might = 2, reflex = 5, knowledge = 1 },
startingPerkIds = new System.Collections.Generic.List<string> { "nimble-step" }
attributes = new EntityAttributes { might = 2, reflex = 5, knowledge = 1 },
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
},
new() {
id = "companion-scholar",
displayName = "Quill",
attributes = new CharacterAttributes { might = 1, reflex = 2, knowledge = 5 },
startingPerkIds = new System.Collections.Generic.List<string> { "lorekeeper" }
attributes = new EntityAttributes { might = 1, reflex = 2, knowledge = 5 },
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
},
new() {
id = "companion-vanguard",
displayName = "Brant",
attributes = new CharacterAttributes { might = 4, reflex = 3, knowledge = 2 },
startingPerkIds = new System.Collections.Generic.List<string> { "bulwark" }
attributes = new EntityAttributes { might = 4, reflex = 3, knowledge = 2 },
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
},
new() {
id = "companion-tracker",
displayName = "Mira",
attributes = new CharacterAttributes { might = 2, reflex = 4, knowledge = 3 },
startingPerkIds = new System.Collections.Generic.List<string> { "pathfinder" }
attributes = new EntityAttributes { might = 2, reflex = 4, knowledge = 3 },
perksData = new PerksData(){
perks = new List<PerkDefinition>()
}
}
};
var companions = new System.Collections.Generic.List<CharacterData>();
var companions = new List<CharacterDefinition>();
for(var i = 0; i < companionCount && i < companionTemplates.Length; i++) {
companions.Add(characterFactory.CreateFromTemplate(companionTemplates[i], CharacterRole.Companion));
}