forked from Shardstone/trail-into-darkness
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System;
|
|
using System.Linq;
|
|
|
|
namespace Nox.Game {
|
|
public interface ICharacterStatsFactory {
|
|
EntityStats Create(EntityAttributes attributes);
|
|
}
|
|
|
|
public sealed class CharacterStatsFactory : ICharacterStatsFactory {
|
|
private readonly CharacterRegistry characterRegistry;
|
|
|
|
public CharacterStatsFactory(CharacterRegistry characterRegistry) {
|
|
this.characterRegistry = characterRegistry;
|
|
}
|
|
|
|
public EntityStats Create(EntityAttributes attributes) {
|
|
if(attributes.attributes.All(a => a.value != 0)) {
|
|
throw new ArgumentOutOfRangeException( "attributes cannot be zero or negative.", new ArgumentException() );
|
|
}
|
|
|
|
//TODO: Create stats based on attributes
|
|
|
|
// int maxHealth = options.baseHealth + attributes.might * options.mightHealthBonus;
|
|
// int maxStamina = options.baseStamina +
|
|
// attributes.might * options.mightStaminaBonus +
|
|
// attributes.knowledge * options.knowledgeStaminaBonus;
|
|
|
|
return new EntityStats { };
|
|
}
|
|
}
|
|
}
|