{"id":15556574,"url":"https://github.com/comigor/d20","last_synced_at":"2025-04-23T20:46:16.529Z","repository":{"id":53556695,"uuid":"148801774","full_name":"comigor/d20","owner":"comigor","description":"Dart library for RPG dice rolling","archived":false,"fork":false,"pushed_at":"2022-11-01T17:50:45.000Z","size":72,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T05:53:34.250Z","etag":null,"topics":["d20","dart","dart-library","dice","dice-roller","flutter","hacktoberfest","random","rpg"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/comigor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-14T14:43:07.000Z","updated_at":"2022-10-09T15:18:30.000Z","dependencies_parsed_at":"2022-09-06T09:41:02.055Z","dependency_job_id":null,"html_url":"https://github.com/comigor/d20","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comigor%2Fd20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comigor%2Fd20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comigor%2Fd20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comigor%2Fd20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comigor","download_url":"https://codeload.github.com/comigor/d20/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513382,"owners_count":21443200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d20","dart","dart-library","dice","dice-roller","flutter","hacktoberfest","random","rpg"],"created_at":"2024-10-02T15:14:14.550Z","updated_at":"2025-04-23T20:46:16.480Z","avatar_url":"https://github.com/comigor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://camo.githubusercontent.com/ea37eaceae12eedced315029af7a335d34b4a018/68747470733a2f2f63646e2e706978616261792e636f6d2f70686f746f2f323031322f30342f31382f31352f30312f6879706572637562652d33373237385f3936305f3732302e706e67\" width=\"150\"\u003e\n  \u003ch1\u003eD20\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n[![View at pub.dev][pub-badge]][pub-link]\n[![Test][actions-badge]][actions-link]\n[![PRs Welcome][prs-badge]][prs-link]\n[![Star on GitHub][github-star-badge]][github-star-link]\n[![Fork on GitHub][github-forks-badge]][github-forks-link]\n\n[pub-badge]: https://img.shields.io/pub/v/d20?style=for-the-badge\n[pub-link]: https://pub.dev/packages/d20\n\n[actions-badge]: https://img.shields.io/github/workflow/status/comigor/d20/CI?style=for-the-badge\n[actions-link]: https://github.com/comigor/d20/actions\n\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge\n[prs-link]: https://github.com/comigor/d20/issues\n\n[github-star-badge]: https://img.shields.io/github/stars/comigor/d20.svg?style=for-the-badge\u0026logo=github\u0026logoColor=ffffff\n[github-star-link]: https://github.com/comigor/d20/stargazers\n\n[github-forks-badge]: https://img.shields.io/github/forks/comigor/d20.svg?style=for-the-badge\u0026logo=github\u0026logoColor=ffffff\n[github-forks-link]: https://github.com/comigor/d20/network/members\n\nD20 is a Dart library for RPG dice rolling. Supports standard notation (like \"2d12\", \"d6+5\" and \"2d20-L\").\n\n## Installation\n\nAdd the following to your `pubspec.yaml` file:\n```yaml\ndependencies:\n  d20: \u003c1.0.0\n```\nthen run:\n```shell\npub get\n```\nor with flutter:\n```shell\nflutter packages get\n```\n\n## Usage\n\n```dart\nimport 'package:d20/d20.dart';\n\nvoid main() {\n  final d20 = D20();\n  print(d20.roll('2d8+5+5d6'));\n}\n\n```\n\nOne can also get (probably) useful information of roll results:\n```dart\nimport 'package:d20/d20.dart';\n\nvoid main() {\n  final d20 = D20();\n  final stats = d20.rollWithStatistics('2d8+5+5d6');\n  print(stats.results[0].faces);\n  print(stats.results[1].results);\n}\n\n```\n\n## Supported notation\nThe [standard dice notation](https://en.wikipedia.org/wiki/Dice_notation) will be parsed, such as 2d8+4.\n\n### L and H subtraction\nWhen a `-L` or `-H` follows a roll, as in `2d20-L`, the lowest (or highest) roll of the sequence will be subtracted from the result.\n\n### Operators\nYou can also use mathematical operators, such as `1d6*3` or `10d4/d6`; or even `10 * sin(d20)`, though I'm not sure why you'd need that.\n\n### Percentile dice (d%)\nYou can also use use the `d%` notation instead of `d100`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomigor%2Fd20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomigor%2Fd20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomigor%2Fd20/lists"}