mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-22 09:22:24 +00:00
- To make prototyping and possibly future custom content easier, I've created a JSON-based object format with the same properties found in The Sims - Renamed dorms directory to dorm - Added some d20 C code I found to possibly enhance the skill system in the future - Added voting machine by Don Hopkins - Removed core.h in favor of niotso.zig which accomplishes the same thing
22 lines
No EOL
701 B
C
22 lines
No EOL
701 B
C
/** @file d20.h
|
|
* @brief Implements Dungeons & Dragons style dice in C
|
|
*
|
|
* d20.h is a reimplementation of https://github.com/opensourcedoc/d20-c,
|
|
* but following the principles of being a single header/file library with
|
|
* a minimal API
|
|
*
|
|
* @author adamml
|
|
* @date 2022-11-07
|
|
*/
|
|
|
|
#ifndef COM_GITHUB_ADAMML_D20
|
|
#define COM_GITHUB_ADAMML_D20
|
|
|
|
|
|
#define ROLL_FROM_CHAR_ARRAY_PARSE_FAILURE_NO_NUMBER_DICE -9999; /* The number of dices to roll was not correctly parsed */
|
|
#define ROLL_FROM_CHAR_ARRAY_PARSE_FAILURE_NO_NUMBER_OF_SIDES -99999; /* The number of sides on the dice was not correctl parsed */
|
|
|
|
int roll_from_char_array(const char *ca);
|
|
int roll(int dice, int sides, int modifer);
|
|
|
|
#endif |