codebuddies / dungeonbuddies

Multi User Dungeon Coded by codebuddies slack members
MIT License
6 stars 3 forks source link

Game Logic #2

Open tyberious-1 opened 5 years ago

tyberious-1 commented 5 years ago

So for the game logic I think we should start by making the random number generators classes to simulate the dice mechanics. Followed by the meet or beat variables we need for the decision trees.

cbelsole commented 5 years ago

Also coming up with a list of actions we want the user to be able to do will inform the stats we need to have under to perform those actions. Using the 5e rules we need the 6 stats (Strength, Dexterity, Constitution, Intelligence, Wisdom, Carisma) for any action. After that, if we need the characters to swing weapons and cast spells we need to figure out the stats for weapons and what spells we want to initially support. For example:

Action:
Name: Swing weapon
Type: Standard
Main Stat: Strength
Weapon: `character.mainWeapon()`

Action:
Name: Cast spell
Type: Standard
Main Stat: Intelligence
Spell: `character.hasSpell("spell name")`

Following the line of logic from the chat. Person enters action into chat -> server receives message -> message is converted into action -> action is executed -> server sends response. It seems like a good place to start.

tyberious-1 commented 5 years ago

I have the dice rolling mechanic finish. Will up load tonight to github.

tyberious-1 commented 5 years ago

Please use Basic Fantasy RPG for reference for rules since DND 5e material is not all open source and is usually more complicated. Other than that yes that is how this will work the dice mechanic will roll the dice then add modifiers based on the appropriate stat then the server makes an comparison. http://basicfantasy.org/