diff options
author | Your Name <you@example.com> | 2023-05-31 17:04:47 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2023-05-31 17:04:47 -0400 |
commit | 19a226f512a924def233dbd723d6d7a66ed382d3 (patch) | |
tree | a08fffcd160208e251eb7eb32ee7669c6761c130 /src/creature.cc | |
parent | 321fcc04b7f77a35c2099b6724de3f780adbd580 (diff) | |
download | dmtool-32b7506f78382a3a08628b183e65cf66d037187b.tar.gz (sig) dmtool-32b7506f78382a3a08628b183e65cf66d037187b.tar.bz2 (sig) dmtool-32b7506f78382a3a08628b183e65cf66d037187b.zip (sig) |
Added automatic creature name generationv1.0.0
Diffstat (limited to 'src/creature.cc')
-rw-r--r-- | src/creature.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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 <algorithm> #include <iostream> #include <sstream> @@ -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 |