Skip to content

Commit

Permalink
bump version + doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Asraf committed Jun 16, 2020
1 parent d6f9692 commit 43f6184
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 63 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v2.0.5
* DW data updates/fixes

# v2.0.4
* File structure changes
* Bugfixes

# v2.0.3+2
* Bugfix in exporting spell tags

Expand Down
File renamed without changes.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ There is more information in the doc directory.

## Available data

* `List<Move>` basicMoves - Dungeon World's basic moves, such as Hack & Slash, Defy Danger, etc.
* `List<Move>` specialMoves - Dungeon World's special moves, such as Make Camp, Take Watch, etc.
* `List<PlayerClass>` classes - All of Dungeon World's classes, plus some homebrews.
See `PlayerClass` class for a full description of the usable properties.
* `List<Equipment>` equipment - Dungeon World's main list of items.
* `List<Spell>` spells - Dungeon World's main spellbook list. Each class can have its own spells
list, see `PlayerClass` in the docs for more information.
* `List<Monster>` monsters - Dungeon World's main monster list.
* `List<Tag>` tags - List of all basic tags, along with descriptions.
| Name | Type | Description |
| ---- | ---- | ----------- |
| basicMoves | `List<Move>` | Dungeon World's basic moves, such as Hack & Slash, Defy Danger, etc. |
| specialMoves | `List<Move>` | Dungeon World's special moves, such as Make Camp, Take Watch, etc. |
| classes | `List<PlayerClass>` | All of Dungeon World's classes, plus some homebrews.
See `PlayerClass` class for a full description of the usable properties. |
| equipment | `List<Equipment>` | Dungeon World's main list of items. |
| spells | `List<Spell>` | Dungeon World's main spellbook list. Each class can have its own spells
list, see `PlayerClass` in the docs for more information. |
| monsters | `List<Monster>` | Dungeon World's main monster list. |
| tags | `List<Tag>` | List of all basic tags, along with descriptions. |

There is also a `Dice` class, with simple dice rolling functionality for your use.

Expand All @@ -32,6 +34,6 @@ The data is from there, this package simply wraps it up for Dart.
## Contributing

1. Make your changes
1. Make a PR, explain what your changes do, what could break.
1. ???
1. Run tests, and add new tests if appropriate. Make sure nothing breaks.
1. Create a PR, explain what your changes do.
1. Profit!
4 changes: 3 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.
include: package:pedantic/analysis_options.yaml

analyzer:
exclude:
- example/*.dart
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
# Uncomment to specify additional rules.
# linter:
Expand Down
9 changes: 9 additions & 0 deletions example/classes.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
// Get bard class
var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
// Get all bard advanced moves

var moves = bard.advancedMoves1;
}
12 changes: 12 additions & 0 deletions example/equipment.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
// Get inventory items
var equipment1 = dungeonWorld.equipment.first;

// Get gear choices for class

var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
var gearChoices1 = bard.gearChoices.map((i) => i.toJSON()).toList();
;
}
47 changes: 0 additions & 47 deletions example/example.dart

This file was deleted.

6 changes: 6 additions & 0 deletions example/monsters.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
// Get all monsters
var monsters = dungeonWorld.monsters.map((monster) => monster.name);
}
11 changes: 11 additions & 0 deletions example/moves.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
var thief = dungeonWorld.classes.firstWhere((k) => k.key == 'thief');

// Flattened move lists
var moves1 = bard.advancedMoves1;
var moves2 = dungeonWorld.basicMoves.first;
var moves3 = thief.startingMoves;
}
10 changes: 10 additions & 0 deletions example/spells.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
// Get all spells
var spell1 = dungeonWorld.spells.first;

// Get spells for class
var wizard = dungeonWorld.classes.firstWhere((k) => k.key == 'wizard');
var spells1 = wizard.spells;
}
14 changes: 14 additions & 0 deletions example/tags.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:dungeon_world_data/dw_data.dart';

void main() {
// Parse tags from objects or strings
var tag1 = Tag.fromJSON({'weight': 1});
var tag2 = Tag.fromJSON('{coins: 3}');
var tag3 = Tag.fromJSON('close');

// All info tags
var tagInfos = dungeonWorld.tags;

// Get tags from spells, equipment
var tags1 = dungeonWorld.spells.first.tags;
}
4 changes: 2 additions & 2 deletions lib/dice.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:quiver/core.dart';
class Dice {
num amount;
num sides;
DiceResult lastResult;

/// Simple dice, with sides and die count.
/// You can multiply, add or subtract Dice objects to change the amount of rolls (notice dice must
Expand Down Expand Up @@ -109,8 +110,7 @@ class Dice {
for (num i = 0; i < amount; i++) {
results.add(Random().nextInt(sides) + 1);
}

return DiceResult(this, results);
return lastResult = DiceResult(this, results);
}

Dice get single => this / amount;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: dungeon_world_data
homepage: https://github.com/chenasraf/dungeon_world_data
homepage: https://github.com/DungeonPaper/dungeon_world_data
description: Data dump of Dungeon World classes, moves, equipment, and more. Also mirrored as NPM package.
version: 2.0.4
version: 2.0.5

environment:
sdk: ">=2.3.0 <3.0.0"
Expand Down

0 comments on commit 43f6184

Please sign in to comment.