Moar refactoring

This commit is contained in:
Sebastian Bularca
2026-03-30 01:06:02 +02:00
parent 30f319a52d
commit e7d5acac7c
10 changed files with 134 additions and 83 deletions

View File

@@ -4,31 +4,39 @@ namespace Nox.Game {
public class PartyCreatorModel {
private readonly ICharacterFactory characterFactory;
private readonly IPartyFactory partyFactory;
private readonly DefaultPartySettings defaultPartySettings;
public PartyCreatorModel(ICharacterFactory characterFactory, IPartyFactory partyFactory, DefaultPartySettings defaultPartySettings) {
this.characterFactory = characterFactory;
this.partyFactory = partyFactory;
this.defaultPartySettings = defaultPartySettings;
}
public PartyDefinition CreatePartyForNewRun(int companionCount) {
var protagonist = characterFactory.CreateCustomProtagonist(new CustomCharacterCreationRequest {
displayName = "John Doe",
attributes = new EntityAttributes(),
perks = new PerksData(){
perks = new List<PerkDefinition>()
Name = "John Doe",
Attributes = new EntityAttributes {
attributes = new[] {
new Attribute(AttributeType.Might, 3),
new Attribute(AttributeType.Reflex, 3),
new Attribute(AttributeType.Knowledge, 3),
new Attribute(AttributeType.Perception, 3)
}
}
});
var rook_attributes = new EntityAttributes();
rook_attributes.attributes = new[] {
new Attribute(AttributeType.Might, 6),
new Attribute(AttributeType.Knowledge, 2),
new Attribute(AttributeType.Perception, 2),
new Attribute(AttributeType.Reflex, 4)
var rookAttributes = new EntityAttributes {
attributes = new[] {
new Attribute(AttributeType.Might, 6),
new Attribute(AttributeType.Knowledge, 2),
new Attribute(AttributeType.Perception, 2),
new Attribute(AttributeType.Reflex, 4)
}
};
CharacterTemplate[] companionTemplates = {
new() {
displayName = "Rook",
attributes = rook_attributes,
perksData = new PerksData(){
Name = "Rook",
Attributes = rookAttributes,
Perks = new PerksData(){
perks = new List<PerkDefinition>()
}
}