#pragma once #include #include #include #include #include "rules.h" namespace cmd { // Corresponds to commands // Usage gets a category of its own std::string usage(const std::string& exename); // Filesystem operations std::string list(std::vector args); std::string mkdir(std::vector args); std::string cp(std::vector args); std::string mv(std::vector args); std::string rm(std::vector args); // Manipulators std::string heal(std::vector args); std::string damage(std::vector args, std::map flags); std::string attack(std::vector args, std::map flags); std::string save(std::vector args, std::map flags); std::string reset(std::vector args); std::string set(std::vector args); std::string add(std::vector args); std::string del(std::vector args); std::string edit(std::vector args); std::string spellcasting(std::vector args); std::string git(std::vector args); //Queries std::string attacks(std::vector args); std::string roll(std::vector args); // Command-centric helpers // Not idempotent: only do once! std::filesystem::path getTruePath(std::filesystem::path virtPath); std::vector getVirtDirs(void); // Helper functions std::string formatRoll(std::string name, std::string type, int rolled, int bonus); std::vector parseQualifiers(std::map flags); }