a bit more work on the system to create a default character set and testable environment for that

This commit is contained in:
Sebastian Bularca
2026-03-22 18:11:58 +01:00
parent da74abb039
commit 47d30c0c49
16 changed files with 241 additions and 59 deletions

View File

@@ -40,7 +40,14 @@ namespace Nox.Game {
public int knowledge;
public int perception;
public int Total => might + reflex + knowledge;
public static EntityAttributes operator +(EntityAttributes a, EntityAttributes b) {
return new EntityAttributes {
might = a.might + b.might,
reflex = a.reflex + b.reflex,
knowledge = a.knowledge + b.knowledge,
perception = a.perception + b.perception
};
}
}
[Serializable]
@@ -118,8 +125,8 @@ namespace Nox.Game {
[Serializable]
public sealed class PartyDefinition {
public List<CharacterDefinition> members = new();
public int maxPartySize;
public List<CharacterDefinition> members = new();
[JsonIgnore]
public CharacterDefinition Protagonist => members.FirstOrDefault(m => m.role == CharacterRole.Protagonist);