diff --git a/commands/baseCommand.c b/commands/baseCommand.c index d0403ddbe..0186dd3c6 100644 --- a/commands/baseCommand.c +++ b/commands/baseCommand.c @@ -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", diff --git a/commands/player/kill.c b/commands/player/kill.c index 80d465c73..0a54d4936 100644 --- a/commands/player/kill.c +++ b/commands/player/kill.c @@ -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"; +} diff --git a/commands/player/level.c b/commands/player/level.c index b7f597f06..fc3267a11 100644 --- a/commands/player/level.c +++ b/commands/player/level.c @@ -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"; +} diff --git a/commands/player/look.c b/commands/player/look.c index 583512ff7..3934d95bf 100644 --- a/commands/player/look.c +++ b/commands/player/look.c @@ -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."; +} diff --git a/commands/player/quests.c b/commands/player/quests.c index e2687fad9..82fd19168 100644 --- a/commands/player/quests.c +++ b/commands/player/quests.c @@ -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); +} diff --git a/commands/player/quit.c b/commands/player/quit.c index 0eb752a38..de67efb43 100644 --- a/commands/player/quit.c +++ b/commands/player/quit.c @@ -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"; +} diff --git a/commands/player/research.c b/commands/player/research.c index f2540a8c5..daccee128 100644 --- a/commands/player/research.c +++ b/commands/player/research.c @@ -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"; +} diff --git a/commands/player/save.c b/commands/player/save.c index 595d91949..914771389 100644 --- a/commands/player/save.c +++ b/commands/player/save.c @@ -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"; +} diff --git a/commands/player/say.c b/commands/player/say.c index ea9d82fc1..e4540bb02 100644 --- a/commands/player/say.c +++ b/commands/player/say.c @@ -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"; } diff --git a/commands/player/score.c b/commands/player/score.c index 934b49572..25a978bd8 100644 --- a/commands/player/score.c +++ b/commands/player/score.c @@ -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"; +} diff --git a/commands/player/shop.c b/commands/player/shop.c index b69175e92..1045bfb10 100644 --- a/commands/player/shop.c +++ b/commands/player/shop.c @@ -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"; +} diff --git a/commands/player/shout.c b/commands/player/shout.c index 90d23881c..05e8e6027 100644 --- a/commands/player/shout.c +++ b/commands/player/shout.c @@ -129,3 +129,85 @@ public nomask int execute(string command, object initiator) } return ret; } + +///////////////////////////////////////////////////////////////////////////// +protected string wildcardMeaning(string colorConfiguration) +{ + return "\x1b[0;31;1m\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"; +} diff --git a/commands/player/tell.c b/commands/player/tell.c index 2272568e0..bb36b5c3b 100644 --- a/commands/player/tell.c +++ b/commands/player/tell.c @@ -94,3 +94,24 @@ public nomask int execute(string command, object initiator) } return ret; } + +///////////////////////////////////////////////////////////////////////////// +protected string synopsis(string displayCommand, string colorConfiguration) +{ + return "Send a message to a specific person on the mud"; +} + +///////////////////////////////////////////////////////////////////////////// +protected string description(string displayCommand, string colorConfiguration) +{ + return format("Tell will send a message to a specific person on the " + "mud. During a conversation such as this, the 'reply' " + "command can be used to direct a message back to the last " + "person who has sent a 'tell' to you.", 78); +} + +///////////////////////////////////////////////////////////////////////////// +protected string notes(string displayCommand, string colorConfiguration) +{ + return "See also: tell, whisper, reply, say, and set"; +} diff --git a/commands/player/who.c b/commands/player/who.c index e4b1e4a9c..768aa2852 100644 --- a/commands/player/who.c +++ b/commands/player/who.c @@ -113,3 +113,57 @@ public nomask int execute(string command, object initiator) } return ret; } + + +///////////////////////////////////////////////////////////////////////////// +protected string synopsis(string displayCommand, string colorConfiguration) +{ + return "Display a list of currently logged-in users."; +} + +///////////////////////////////////////////////////////////////////////////// +protected string flagInformation(string flag, string colorConfiguration) +{ + string ret = ""; + string parsedFlag = regreplace(flag, "[^-]*(-*[a-zA-Z]+).*", "\\1"); + + switch (parsedFlag) + { + case "-w": + { + ret = "This option will filter the who list to only show wizards."; + break; + } + case "-p": + { + ret = "This option will filter the who list to only show players."; + break; + } + case "-r": + { + ret = "This option will filter the who list to only show " + "members of the specified race."; + break; + } + case "-g": + { + ret = "This option will filter the who list to only show " + "members of the specified guild."; + break; + } + } + return format(ret, 72); +} + +///////////////////////////////////////////////////////////////////////////// +protected string description(string displayCommand, string colorConfiguration) +{ + return format("Who will display a list of all players currently " + "on-line.", 78); +} + +///////////////////////////////////////////////////////////////////////////// +protected string notes(string displayCommand, string colorConfiguration) +{ + return "See also: tell, shout, say"; +} diff --git a/tests/commands/player/sayTest.c b/tests/commands/player/sayTest.c index d579585a5..761607c4b 100644 --- a/tests/commands/player/sayTest.c +++ b/tests/commands/player/sayTest.c @@ -232,7 +232,8 @@ void HelpForSayDisplaysProperInfo() "\x1b[0;36;1mDescription\n" "\x1b[0m\x1b[0;36mSay allows a player to display a message to all players located in the same\n" "room where he or she is standing. The character ' can be used as an\n" - "abbreviation for say to save time.\n" + "abbreviation for say to save time. Interactions with players can be blocked\n" + "using the 'block player' setting.\n" "\x1b[0m\x1b[0;36;1m\n" "Options\n" "\x1b[0m\n" @@ -286,10 +287,10 @@ void HelpForSayDisplaysProperInfo() " \x1b[0;32mBob says to Fred, `Hi Fred!'\x1b[0m\n" " \x1b[0m\n" "\x1b[0;36;1mNotes\n" - " \x1b[0m\x1b[0;36mSee also: tell, whisper, reply, and shout\x1b[0m\x1b[0;36;1m\n" + " \x1b[0m\x1b[0;36mSee also: tell, whisper, reply, shout, and set\x1b[0m\x1b[0;36;1m\n" "\n" "Copyright\n" - "\x1b[0m\x1b[0;36m Copyright (C) 1991-2018 Allen Cummings. For additional licensing\n" + "\x1b[0m\x1b[0;36m Copyright (C) 1991-2019 Allen Cummings. For additional licensing\n" " information, see \x1b[0m\x1b[0;36mhttp://realmsmud.org/license/\n" "\x1b[0m", Player->caughtMessage()); diff --git a/tests/commands/player/setTest.c b/tests/commands/player/setTest.c index 1f967e75f..bb318711b 100644 --- a/tests/commands/player/setTest.c +++ b/tests/commands/player/setTest.c @@ -733,7 +733,7 @@ void PlayerHelpDisplaysCorrectly() "\x1b[0;36;1mNotes\n" "\t\x1b[0m\x1b[0;36mSee also: tell, reply, guild, and shout\x1b[0m" "\x1b[0;36;1m\n\nCopyright\n" - "\x1b[0m\x1b[0;36m Copyright (C) 1991-2018 Allen Cummings. For additional licensing\n" + "\x1b[0m\x1b[0;36m Copyright (C) 1991-2019 Allen Cummings. For additional licensing\n" " information, see \x1b[0m\x1b[0;36mhttp://realmsmud.org/license/\n\x1b[0m", Player->caughtMessage()); } @@ -886,7 +886,7 @@ void WizardHelpDisplaysCorrectly() "\x1b[0;36;1mNotes\n" "\t\x1b[0m\x1b[0;36mSee also: tell, reply, guild, and shout\x1b[0m" "\x1b[0;36;1m\n\nCopyright\n" - "\x1b[0m\x1b[0;36m Copyright (C) 1991-2018 Allen Cummings. For additional licensing\n" + "\x1b[0m\x1b[0;36m Copyright (C) 1991-2019 Allen Cummings. For additional licensing\n" " information, see \x1b[0m\x1b[0;36mhttp://realmsmud.org/license/\n\x1b[0m", Wizard->caughtMessage()); } diff --git a/tests/commands/player/vitalsTest.c b/tests/commands/player/vitalsTest.c index 44ac4bc83..630678cf4 100644 --- a/tests/commands/player/vitalsTest.c +++ b/tests/commands/player/vitalsTest.c @@ -120,7 +120,7 @@ void HelpForVitalsDisplaysProperInfo() "\x1b[0;36;1mNotes\n" "\t\x1b[0m\x1b[0;36mSee also: score\x1b[0m" "\x1b[0;36;1m\n\nCopyright\n" - "\x1b[0m\x1b[0;36m Copyright (C) 1991-2018 Allen Cummings. For additional licensing\n" + "\x1b[0m\x1b[0;36m Copyright (C) 1991-2019 Allen Cummings. For additional licensing\n" " information, see \x1b[0m\x1b[0;36mhttp://realmsmud.org/license/\n\x1b[0m", Player->caughtMessage()); }