aboutsummaryrefslogtreecommitdiff
path: root/src/creature.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2023-05-31 17:04:47 -0400
committerYour Name <you@example.com>2023-05-31 17:04:47 -0400
commit19a226f512a924def233dbd723d6d7a66ed382d3 (patch)
treea08fffcd160208e251eb7eb32ee7669c6761c130 /src/creature.cc
parent321fcc04b7f77a35c2099b6724de3f780adbd580 (diff)
downloaddmtool-1.0.0.tar.gz (sig)
dmtool-1.0.0.tar.bz2 (sig)
dmtool-1.0.0.zip (sig)
Added automatic creature name generationv1.0.0
Diffstat (limited to 'src/creature.cc')
-rw-r--r--src/creature.cc4
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