1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#include "cmd.h"
#include <sstream>
#include <string>
namespace cmd {
std::string usage(const std::string& exename) {
std::stringstream text;
text << "Usage:" << std::endl;
std::string indOpt = " " + exename + " ";
std::string indDesc = " ";
text << indOpt << "[ls] [subfolder]" << std::endl;
text << indDesc << "List creatures and objects." << std::endl;
text << indOpt << "cp old-path new-path" << std::endl;
text << indDesc << "Copy old-path to new-path, instantiating it." << std::endl;
text << indOpt << "mkdir path" << std::endl;
text << indDesc << "Make a new directory for holding creatures and objects." << std::endl;
text << indOpt << "mv old-path new-path" << std::endl;
text << indDesc << "Move old-path to new-path." << std::endl;
text << indOpt << "rm path" << std::endl;
text << indDesc << "Remove existing creature, object, or directory." << std::endl;
text << indOpt << "attacks path" << std::endl;
text << indDesc << "List attacks available for a creature" << std::endl;
text << indOpt << "roll path name" << std::endl;
text << indDesc << "Roll a skill check, save, or attack." << std::endl;
text << indOpt << "attack path1 name path2 [-1] [-2]" << std::endl;
text << indDesc << "Roll an attack for path1 attacking path2. Handedness defaults to 2h if versatile and not holding a shield, otherwise use -1 and -2." << std::endl;
text << indOpt << "save ability DC paths [--damage DMG] [--type TYPE] [--halves] [--magical,-m] [--silvered,-s] [--adamantine,-a]" << std::endl;
text << indDesc << "Force creatures at paths to make an ability save at DC. Default: report pass/fail." << std::endl;
text << indDesc << " If --damage, failed saves take TYPE damage (default force), passed saves negate." << std::endl;
text << indDesc << " If --halves, passed saves halve damage rather than negate." << std::endl;
text << indOpt << "damage path amount [type] [--magical,-m] [--silvered,-s] [--adamantine,-a]" << std::endl;
text << indDesc << "Damage creature by amount. Type defaults to \"force\"." << std::endl;
text << indOpt << "heal path amount" << std::endl;
text << indDesc << "Heal creature by amount." << std::endl;
text << indOpt << "reset path" << std::endl;
text << indDesc << "Reset creature to full health (as if completing a long rest)." << std::endl;
text << indOpt << "set path field value" << std::endl;
text << indDesc << "Set a field to a new value, where field is any of:" << std::endl;
text << indDesc << " ability (str, dex, con, int, wis, cha); value is new ability score" << std::endl;
text << indDesc << " skill (athletics, \"sleight of hand\", etc.); value is (none|proficient|expert)" << std::endl;
text << indDesc << " proficiency; value is new proficency bonus." << std::endl;
text << indDesc << " name; value is new given name." << std::endl;
text << indDesc << " cost; (for an item) value is cost in cp." << std::endl;
text << indDesc << " weight; (for an item) value is weight in lbs." << std::endl;
text << indOpt << "edit path" << std::endl;
text << indDesc << "Edit notes associated with creature." << std::endl;
text << indOpt << "add path entry" << std::endl;
text << indDesc << "Add entry to creature, where entry is an item or spell." << std::endl;
text << indOpt << "del path entry" << std::endl;
text << indDesc << "Delete entry from creature, where entry is an item or spell." << std::endl;
text << indOpt << "spellcasting path SUBCOMMAND" << std::endl;
text << indDesc << "Manipulate creature's spellcasting feature, where subcommand is any of:" << std::endl;
text << indDesc << " init; adds spellcasting to a creature which currently does not have spellcasting" << std::endl;
text << indDesc << " ability value; sets the spellcasting ability, where value is the ability name" << std::endl;
text << indDesc << " level l slots; sets the number of slots at spell level l to slots" << std::endl;
text << indOpt << "create path type name" << std::endl;
text << indDesc << "Create a new entry at path location of type and name, where type is any of item, weapon, armor, spell, feature, feature_attack, creature." << std::endl;
text << indOpt << "git [command]" << std::endl;
text << indDesc << "Execute a git command within the dmtool folder." << std::endl;
text << indOpt << "help" << std::endl;
text << indDesc << "Show this help." << std::endl;
return text.str();
}
}
|