Skip to content

Commit

Permalink
Merged PR 438: Merge 200_enhancements_to_help to master
Browse files Browse the repository at this point in the history
Related work items: #200
  • Loading branch information
Allen B. Cummings committed Feb 14, 2019
1 parent 20473f0 commit 15a024e
Show file tree
Hide file tree
Showing 17 changed files with 409 additions and 9 deletions.
2 changes: 1 addition & 1 deletion commands/baseCommand.c
Expand Up @@ -372,7 +372,7 @@ protected string copyright(string colorConfiguration)
{
return configuration->decorate("\n\nCopyright\n", "heading", "help",
colorConfiguration) +
configuration->decorate("\tCopyright (C) 1991-2018 Allen "
configuration->decorate("\tCopyright (C) 1991-2019 Allen "
"Cummings. For additional licensing\n\tinformation, see ",
"text", "help", colorConfiguration) +
configuration->decorate("http://realmsmud.org/license/\n",
Expand Down
24 changes: 24 additions & 0 deletions commands/player/kill.c
Expand Up @@ -46,3 +46,27 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Initiate combat with another character";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("Kill will initiate combat with the specified target "
"with several caveats:\n1. Some environments can prevent combat "
"from being initiated.\n2. Characters that are members of your "
"faction or a faction you are friendly with cannot be attacked "
"unless a deliberate setting change is first made.\n3. You can "
"only attack other players if both you and your intended target "
"have set the pvp flag. Once this is done, it is permanent.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: set";
}
40 changes: 40 additions & 0 deletions commands/player/level.c
Expand Up @@ -69,3 +69,43 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Brings up the 'level up' menu.";
}

/////////////////////////////////////////////////////////////////////////////
protected string flagInformation(string flag, string colorConfiguration)
{
string ret = "";
string parsedFlag = regreplace(flag, "[^-]*(-[a-zA-Z]+).*", "\\1");

switch (parsedFlag)
{
case "-g":
{
ret = "This option short-circuits the main levelling menu and "
"displays the sub-menu for the specified guild.";
break;
}
}
return format(ret, 72);
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("Level up allows a player to advance in a guild or "
"multiple guilds when they have earned enough experience to do so. "
"Through this menu, a player can choose to advance skills, "
"attributes, select research trees, and gain research / guild "
"abilities or traits.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: score, research, skills, traits";
}
41 changes: 41 additions & 0 deletions commands/player/look.c
Expand Up @@ -88,3 +88,44 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Examine the details of another object or environment";
}

/////////////////////////////////////////////////////////////////////////////
protected string flagInformation(string flag, string colorConfiguration)
{
string ret = "";
string parsedFlag = regreplace(flag, "[^-]*(-[a-zA-Z]+).*", "\\1");

switch (parsedFlag)
{
case "-b":
{
ret = "This option will display a brief description of "
"the target of the examination. 'look -b' is synonymous "
"with (and this flag is redundant for) the 'glance' "
"command.";
break;
}
}
return format(ret, 72);
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The look command (and all of its permutations) will "
"describe the details of the target for the player, including "
"other objects that might be in the target (if it's an environment "
"or container, for example.)", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "Things that you can look at often have other possible interactions.";
}
14 changes: 14 additions & 0 deletions commands/player/quests.c
Expand Up @@ -41,3 +41,17 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Enter the quests subsystem menu";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The quests menu allows a player to track their current "
"(and completed) quests and journal their progress through the "
"various quests they have been given.", 78);
}
19 changes: 19 additions & 0 deletions commands/player/quit.c
Expand Up @@ -53,3 +53,22 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Quit the game";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The quit command is rather straightforward: It allows one "
"to leave the game, saving the character before doing so.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: save";
}
23 changes: 23 additions & 0 deletions commands/player/research.c
Expand Up @@ -41,3 +41,26 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Enter the research subsystem menu";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The research command is used to browse your various "
"learned research items and open research trees.\n\nResearch is "
"the means by which you can learn crafting methods, domain "
"management / world building skills, new guild abilities, racial "
"and background abilities, trades, and many other player "
"improvement 'things'.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: level up";
}
21 changes: 21 additions & 0 deletions commands/player/save.c
Expand Up @@ -26,3 +26,24 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Save your current progress";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The save command is rather straightforward: It allows one "
"to save the current state of their character. It should be noted "
"that many events trigger a character save - such as death, key "
"plot points, going link dead, dying, and others.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: quit";
}
5 changes: 3 additions & 2 deletions commands/player/say.c
Expand Up @@ -245,11 +245,12 @@ protected string description(string displayCommand, string colorConfiguration)
{
return format("Say allows a player to display a message to all players "
"located in the same room where he or she is standing. The character ' "
"can be used as an abbreviation for say to save time.", 78);
"can be used as an abbreviation for say to save time. Interactions "
"with players can be blocked using the 'block player' setting.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: tell, whisper, reply, and shout";
return "See also: tell, whisper, reply, shout, and set";
}
38 changes: 38 additions & 0 deletions commands/player/score.c
Expand Up @@ -278,3 +278,41 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Displays the player's general information page";
}

/////////////////////////////////////////////////////////////////////////////
protected string flagInformation(string flag, string colorConfiguration)
{
string ret = "";
string parsedFlag = regreplace(flag, "[^-]*(-[a-zA-Z]+).*", "\\1");

switch (parsedFlag)
{
case "-v":
{
ret = "This option will display verbose information about "
"the player such as best kill and other combat statistics.";
break;
}
}
return format(ret, 72);
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("Score will display the character's vitals, race, attributes, "
"and high-level combat information. In verbose mode, it will also "
"display combat statistics for the character.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: inventory, quests, research, traits, and vitals";
}
21 changes: 21 additions & 0 deletions commands/player/shop.c
Expand Up @@ -29,3 +29,24 @@ public nomask int execute(string command, object initiator)
}
return ret;
}


/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Enter the shop subsystem menu when in a shop";
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("The shop command enters the shop menu when a player is "
"in a store or other location where you can purchase or sell "
"items.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: talk";
}
82 changes: 82 additions & 0 deletions commands/player/shout.c
Expand Up @@ -129,3 +129,85 @@ public nomask int execute(string command, object initiator)
}
return ret;
}

/////////////////////////////////////////////////////////////////////////////
protected string wildcardMeaning(string colorConfiguration)
{
return "\x1b[0;31;1m<Message to speak>\x1b[0m";
}

/////////////////////////////////////////////////////////////////////////////
protected string synopsis(string displayCommand, string colorConfiguration)
{
return "Send a message to everyone on the mud";
}

/////////////////////////////////////////////////////////////////////////////
protected string flagInformation(string flag, string colorConfiguration)
{
string ret = "";
string parsedFlag = regreplace(flag, "[^-]*(-[a-zA-Z]+).*", "\\1");
switch (parsedFlag)
{
case "-v":
{
ret = "This option will replace the verb displayed as part of "
"the 'shout' message. For example:\n\t\x1b[0;37m> shout -v grumble "
"I'm grumpy!\n\t\x1b[0;32mYou grumble, `I'm grumpy!'\x1b[0m\n"
"\x1b[0;36mOthers users would then see:\n"
"\t\x1b[0;32mBob grumbles, `I'm grumpy!'\x1b[0m\n";
break;
}
case "-a":
{
ret = "This option will add an adverb to "
"the 'shout' message. For example:\n\t\x1b[0;37m> shout -a sarcastically "
"You're my hero!\n\t\x1b[0;32mYou sarcastically shout, `You're my hero!'\x1b[0m\n"
"\x1b[0;36mOthers users would then see:\n"
"\t\x1b[0;32mBob sarcastically shouts, `You're my hero!'\x1b[0m\n";
break;
}
case "-l":
{
ret = "This option will translate the message you wish to shout into "
"the given language - or at least attempt to do so. Your skill "
"in the target language will determine whether or not it is "
"translated appropriately or becomes gibberish. Those in the "
"environment will then use their skill to translate the message "
"back to English. For example if you have no skill in a "
"language, you might see:\n\t\x1b[0;37m> shout -l orcish "
"I should shout something nice.\n\t\x1b[0;32mYou shout in complete "
"gibberish, `Blarg nukuleve zog forgla bup'\n"
"\x1b[0;36mOthers users would see:\n"
"\t\x1b[0;32mBob shouts in complete gibberish, `Blarg nukuleve zog "
"forgla bup'\n\x1b[0;36mMeanwhile, if you do know a language you might "
"see:\n\t\x1b[0;37m> shout -l elven I should shout something nice."
"\n\t\x1b[0;32mYou shout in elven, `I should shout something nice.'\n"
"\x1b[0;36mOthers users that have a high skill in elven would see:"
"\n\t\x1b[0;32mBob shouts in elven, `I should shout something nice.'\n"
"\x1b[0;36mOthers users that have no skill in elven would see:"
"\n\t\x1b[0;32mBob shouts in elven, `Naur wu simildin welana loomen'\n"
"\x1b[0;36mIt is important to note that knowledge of a language is "
"a range and, so too, is one's ability to speak and translate "
"it. You will go from being able to speak/understand nothing "
"to brokenly speaking or partially understanding all the way "
"through being completely fluent.\x1b[0;36m\n";
break;
}
}
return format(ret, 72);
}

/////////////////////////////////////////////////////////////////////////////
protected string description(string displayCommand, string colorConfiguration)
{
return format("Shout allows a player to display a message to all players "
"in the game. Players can block shouts using the earmuffs "
"setting.", 78);
}

/////////////////////////////////////////////////////////////////////////////
protected string notes(string displayCommand, string colorConfiguration)
{
return "See also: tell, whisper, reply, say, and set";
}

0 comments on commit 15a024e

Please sign in to comment.