Search in sources :

Example 1 with HiddenCommand

use of tel.discord.rtab.board.HiddenCommand in project RtaB6 by Telnaior.

the class Player method awardHiddenCommand.

public void awardHiddenCommand() {
    // Get a random hidden command
    HiddenCommand chosenCommand = Board.generateSpace(HiddenCommand.values());
    // We have to start building the help string now, before we actually award the new command to the player
    StringBuilder commandHelp = new StringBuilder();
    if (hiddenCommand != HiddenCommand.NONE)
        commandHelp.append("Your Hidden Command has been replaced with...\n");
    else
        commandHelp.append("You found a Hidden Command...\n");
    // Then award the command and send them the PM telling them they have it
    hiddenCommand = chosenCommand;
    if (!isBot) {
        commandHelp.append(chosenCommand.pickupText);
        commandHelp.append("\nYou may only have one Hidden Command at a time, and you will keep it even across rounds " + "until you either use it or hit a bomb and lose it.\n" + "Hidden commands must be used in the game channel, not in private.");
        user.openPrivateChannel().queue((channel) -> channel.sendMessage(commandHelp.toString()).queueAfter(1, TimeUnit.SECONDS));
    }
}
Also used : HiddenCommand(tel.discord.rtab.board.HiddenCommand)

Aggregations

HiddenCommand (tel.discord.rtab.board.HiddenCommand)1