From d0e356d09e30a11c1e072415a5088f829d5c0a04 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 16 Jan 2022 21:32:01 -0500 Subject: Worked on features --- src/cmd/cmd.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/cmd/cmd.h (limited to 'src/cmd/cmd.h') diff --git a/src/cmd/cmd.h b/src/cmd/cmd.h new file mode 100644 index 0000000..ff96b32 --- /dev/null +++ b/src/cmd/cmd.h @@ -0,0 +1,47 @@ +#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); +} -- cgit v1.2.3