I'll work on getting a book.
I've looked at my .h and .cpp with fresh eyes, and I've implemented strcpy.
Monster.h:
#ifndef Monster_H
#define Monster_H
#include <Arduino.h>
class Monster{
public:
char mName[20];
bool inCombat;
byte initRoll;
byte currhp;
int hp;
byte initMod;
bool npc;
char details[25];
Monster(char n[20], byte r,byte h, int i, bool p, char d[25]);
void roll();
void engage();
void kill();
void takeHit(int howHard);
};
#endif
Monster.cpp:
#include "Monster.h"
Monster::Monster(char n[25], byte r,byte h, int i, bool p, char d[25]){
strcpy(n , mName);
inCombat = false;
initRoll = r;
hp = h;
currhp = hp;
initMod = i;
npc = p;
strcpy(d, details);
}
void Monster::roll(){
initRoll = random(1,21) + initMod;
}
void Monster::engage(){
inCombat = true;
}
void Monster::kill(){
inCombat = false;
}
void Monster::takeHit(int howHard){
currhp -= howHard;
if (currhp <= 0){
kill();
}
}