GoF module¶
Description¶
This module provides provides an IRC implementation of Days of Wonder’s Gang of Four.
Configuration¶
Options¶
This module provides several configuration options.
Name | Type | Default value | Description |
---|---|---|---|
trigger_create | string | “gof” | The command to use to start or end a Gang of Four game. |
limit | integer | 100 | The game will stop after this limit is reached. The . player(s) with the lowest score win the game. |
pause_delay | integer | 5 | How many seconds does the bot wait after a round ends before it starts the next round. |
start_delay | integer | 20 | How many seconds does the bot wait after enough players have joined the game before the game actually starts. |
trigger_show_cards | string | “ca” | The command to use to show how many cards each player has in his hand. |
trigger_show_discard | string | “cd” | The command to use to show the last discarded combo. |
trigger_choose | string | “ch” | The command to use to choose a card to give to the loser of the previous round. |
trigger_join | string | “jo” | The command to use to join a game after it has been created. |
trigger_show_order | string | “od” | The command to use to show playing order. |
trigger_pass | string | “pa” | The command to use to pass a turn. |
trigger_play | string | “pl” | The command to use to play a combination of cards. [1] |
trigger_show_scores | string | “sc” | The command to use to display the current scores. |
trigger_show_time | string | “ti” | The command to use to show for how long a game has been running. |
trigger_show_turn | string | “tu” | The command to use to show whose player’s turn it is. |
Warning
All triggers should be written without any prefixes. Moreover, triggers should only contain alphanumeric characters.
[1] | Valid combinations include:
See the official rules on Days of Wonder’s website for more information on when you may play a given combination. |
Example¶
Here, we enable the Gang of Four module at the general configuration level. Therefore, the game will be available on all networks/servers/channels. Of course, you can use a more restrictive configuration file if it suits your needs better.
<?xml version="1.0"?>
<configuration
xmlns="http://localhost/Erebot/"
version="0.20"
language="fr-FR"
timezone="Europe/Paris">
<modules>
<!-- Other modules ignored for clarity. -->
<!--
Configure the module:
- the game will be started using the "!gangof4" command.
- the game will start 2 minutes (120 seconds) after 3 players
join it (to give time for a fourth player to join the game).
-->
<module name="\Erebot\Module\GoF">
<param name="trigger_create" value="gangof4" />
<param name="start_delay" value="120" />
</module>
</modules>
</configuration>
Usage¶
This section assumes default values are used for all triggers. Please refer to configuration options for more information on how to customize triggers.
Also, knowledge of the rules for the Gang of Four game is assumed. The full rules for the game can be found (in multiple languages) on Days of Wonder’s website.
Provided commands¶
This module provides the following commands:
Command | Description |
---|---|
!gof | Start a new Gang of Four game. |
!gof cancel or !gof end or !gof off or !gof stop | Stop a currently running Gang of Four game. Can only be used by the person who started the game in the first place. |
ca | Display the number of remaining cards in each player’s hand. |
cd | Display the last played (and thus discarded) card. |
ch card | Choose a card to give to the loser of the previous round. Can only be used at the end of a round by the winner of the previous round. |
jo | Join a currently running Uno game. |
od | Display playing order. |
pa | Pass instead of playing. |
pl combo | Play the given combo of cards (see mnemonics below for the syntax used). Eg. pl g1y1 to play a pair of 1s, containing a “Green 1” and a “Yellow 1”. |
sc | Display the score of each player involved in the current game. |
ti | Display information on how long the current game has been running for. |
tu | Display the name of the player whose turn it is to play. |
Mnemonics for cards¶
The general format used to refer to cards is the first letter of the card’s color (in english) followed by the card’s figure.
The following colors are available:
- green
- yellow
- red
- multi
The following figures are available:
- Numbers from 1 to 10 (inclusive).
- Phoenixes.
- Dragon.
The following table lists a few examples of valid mnemnics with the full name of the card they refer to:
Mnemonic | Actual card |
---|---|
g1 | “Green 1” |
m1 | “Multicolored 1” |
r10 | “Red 10” |
gp | “Green Phoenix” |
yp | “Yellow Phoenix” |
rd | “Red Dragon” |
Not all combinations of colors and figures are valid. In particular, there is only one multicolored figure, one red dragon, a green and a yellow phoenix.