#include "feature.h" #include "../spellcasting.h" #include "../attack.h" #include "../utils.h" #include "../creature.h" #include #include #include using namespace std; namespace entry { shared_ptr Feature::create(const nlohmann::json& data) { if(data["type"] == "spells") { return utils::loadDFromJson(data); } else if(data["type"] == "attack") { return utils::loadDFromJson(data); } return shared_ptr(new Feature(data)); } }