forked from Shardstone/trail-into-darkness
Moar refactoring
This commit is contained in:
@@ -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>()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user