Coder Social home page Coder Social logo

seosaidh / torrpgbot Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 11.4 MB

A Discord Bot that will roll and calculate results for The One Ring rpg.

License: GNU General Public License v3.0

Java 100.00%
rpg rpg-tool tor the-one-ring dice-roller dice discord-bot jda-discord-bot jda-bot

torrpgbot's Introduction

torRpgBot

A Discord Bot that will roll and calculate results for The One Ring rpg.

This bot is distributed under the GNU GPL license. See corresponding license file.

This bot uses the JDA API for Discord. Thank you to the JDA team for all the work you do to maintain this API.

Please see the wiki for more information on contributing, installing, and using this bot.

torrpgbot's People

Contributors

seosaidh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

torrpgbot's Issues

Add Dice Command

Currently, you must enter a skill name if you want to roll dice. In addition, the roller will always roll a feat die (or two if required) and a number of success dice and will always compare the result to some TN.

However, there are many instances where it is desirable to simply roll some arbitrary number of dice, whether it be for a magical item roll, a table roll (such as on magical item tables or hazard tables), or even just to get a random number.

To this end, a "dice" command should be added. The aliases should be "d" and "dice", and it should allow rolling arbitrary d12s and d6s and simply print the results. It should also use the dice face emojis if available.

Fully Document Current Code

The code currently has middling documentation. Each class needs to have an introductory comment, and a couple of classes are missing good comments for various functions. These comments, including JavaDoc comments, need to be added to the code.

Adversary dice

I have added black Adversary dice with read fonts, could you have the program display these icons on adversary rolls?

Add Help Class

Add a HelpCommand class that will handle the command "help" or "h". It will send a private message to the user that sent the command with a detailed description of each command that the bot provides.

Add Configuration File

The ability of the bot to load configuration from a file should be added.
This file can be in any format, although XML or JSON would be preferable.
Right now, the only configuration to store would be the command flag.

Add Emoji Support for Die Faces

Currently, when a dice roll result is displayed, it prints out the numbers as regular ASCII text numbers. Replacing these numbers with emojis that represent the custom TOR dice faces is desirable.

Unit Test Framework

Choose a unit test framework to include in the project that will be used to implement unit testing.

Name of Author is the Username, not Displayname

When a roll command is issued, the name of the person who rolled is given in the results. Currently, this displays the username, not the nickname. It should be the nickname so that the player can have their character name displayed as the author of the roll.

Disadvantage Doesn't Show Unused Feat Die

Describe the bug
When the disadvantage option is included in a roll or adversary command, there is no indication that two feat dice were rolled and the worst kept. This could be either a logic error or simply a reporting error.

To Reproduce
Steps to reproduce the behavior:

  1. Issue a roll/adversary command including the 'd' option
  2. Note lack of unused dice

Expected behavior
There should be a second line below the results that includes the unused feat die. This line is present when a roll with advantage is performed, but not disadvantage.

Flat Modifier is not Printed

Describe the bug
The modifier is not printed in the result string.

To Reproduce
Steps to reproduce the behavior:

  1. Issue any roll or adversary command with a flat modifier
  2. Note that the modifier, while added into the printed sum, is not shown separately from the dice results

Expected behavior
The flat modifier should be shown as a "+ X" (or "-X") after the dice, but before the final sum.

Additional context
Add any other context about the problem here.

Bot Token From Config File

Currently, the bot token is hard-coded into the bot (and is replaced with "REDACTED" on the version on GitHub). However, it would be better to be able to load the token from a configuration file such that anyone can host their own version of the bot without having to edit the source-code.

Add setFlag command

There should be a command to set the command flag. This should only set the flag for the server where the command was issued, and it should save this setting in the configuration file.

Unit Test Implementation

Once the unit test framework is chosen. Implement unit tests for current code.

  • Unit Test TorDice class.
  • Unit Test RollCommand class
  • Unit Test AdversaryCommand class

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.