From 19a226f512a924def233dbd723d6d7a66ed382d3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 31 May 2023 17:04:47 -0400 Subject: Added automatic creature name generation --- src/creature.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/creature.cc') diff --git a/src/creature.cc b/src/creature.cc index ea8ef30..4343b6d 100644 --- a/src/creature.cc +++ b/src/creature.cc @@ -5,6 +5,7 @@ #include "armor.h" #include "attack.h" #include "spellcasting.h" +#include "namegen/namegen.h" #include #include #include @@ -84,6 +85,9 @@ namespace creature { } data->hp = data->hpMax; } + if(getGivenName() == "NAME") { + setGivenName(NameGen::generate(*this)); + } } // True if type without matching qualifiers is in subdata -- cgit v1.2.3