#pragma once #include "features/feature.h" #include "weapon.h" namespace creature { class Creature; } namespace entry { class Attack : public Feature { public: virtual ~Attack() {} virtual std::string getText(const creature::Creature& c) const override {return getWeapon().getText(c) + " " + Entry::getText();} Weapon getWeapon(void) const {return attack;} NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Feature, Attack, attack); private: Weapon attack; }; }