Skip to content

Commit 43f6184

Browse files
author
Chen Asraf
committed
bump version + doc updates
1 parent d6f9692 commit 43f6184

13 files changed

+89
-63
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# v2.0.5
2+
* DW data updates/fixes
3+
4+
# v2.0.4
5+
* File structure changes
6+
* Bugfixes
7+
18
# v2.0.3+2
29
* Bugfix in exporting spell tags
310

LICENSE.md LICENSE

File renamed without changes.

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ There is more information in the doc directory.
1212

1313
## Available data
1414

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

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

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

3436
1. Make your changes
35-
1. Make a PR, explain what your changes do, what could break.
36-
1. ???
37+
1. Run tests, and add new tests if appropriate. Make sure nothing breaks.
38+
1. Create a PR, explain what your changes do.
3739
1. Profit!

analysis_options.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# projects at Google. For details and rationale,
33
# see https://github.com/dart-lang/pedantic#enabled-lints.
44
include: package:pedantic/analysis_options.yaml
5-
5+
analyzer:
6+
exclude:
7+
- example/*.dart
68
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
79
# Uncomment to specify additional rules.
810
# linter:

example/classes.dart

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
// Get bard class
5+
var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
6+
// Get all bard advanced moves
7+
8+
var moves = bard.advancedMoves1;
9+
}

example/equipment.dart

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
// Get inventory items
5+
var equipment1 = dungeonWorld.equipment.first;
6+
7+
// Get gear choices for class
8+
9+
var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
10+
var gearChoices1 = bard.gearChoices.map((i) => i.toJSON()).toList();
11+
;
12+
}

example/example.dart

-47
This file was deleted.

example/monsters.dart

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
// Get all monsters
5+
var monsters = dungeonWorld.monsters.map((monster) => monster.name);
6+
}

example/moves.dart

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
var bard = dungeonWorld.classes.firstWhere((k) => k.key == 'bard');
5+
var thief = dungeonWorld.classes.firstWhere((k) => k.key == 'thief');
6+
7+
// Flattened move lists
8+
var moves1 = bard.advancedMoves1;
9+
var moves2 = dungeonWorld.basicMoves.first;
10+
var moves3 = thief.startingMoves;
11+
}

example/spells.dart

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
// Get all spells
5+
var spell1 = dungeonWorld.spells.first;
6+
7+
// Get spells for class
8+
var wizard = dungeonWorld.classes.firstWhere((k) => k.key == 'wizard');
9+
var spells1 = wizard.spells;
10+
}

example/tags.dart

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import 'package:dungeon_world_data/dw_data.dart';
2+
3+
void main() {
4+
// Parse tags from objects or strings
5+
var tag1 = Tag.fromJSON({'weight': 1});
6+
var tag2 = Tag.fromJSON('{coins: 3}');
7+
var tag3 = Tag.fromJSON('close');
8+
9+
// All info tags
10+
var tagInfos = dungeonWorld.tags;
11+
12+
// Get tags from spells, equipment
13+
var tags1 = dungeonWorld.spells.first.tags;
14+
}

lib/dice.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:quiver/core.dart';
44
class Dice {
55
num amount;
66
num sides;
7+
DiceResult lastResult;
78

89
/// Simple dice, with sides and die count.
910
/// You can multiply, add or subtract Dice objects to change the amount of rolls (notice dice must
@@ -109,8 +110,7 @@ class Dice {
109110
for (num i = 0; i < amount; i++) {
110111
results.add(Random().nextInt(sides) + 1);
111112
}
112-
113-
return DiceResult(this, results);
113+
return lastResult = DiceResult(this, results);
114114
}
115115

116116
Dice get single => this / amount;

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: dungeon_world_data
2-
homepage: https://github.com/chenasraf/dungeon_world_data
2+
homepage: https://github.com/DungeonPaper/dungeon_world_data
33
description: Data dump of Dungeon World classes, moves, equipment, and more. Also mirrored as NPM package.
4-
version: 2.0.4
4+
version: 2.0.5
55

66
environment:
77
sdk: ">=2.3.0 <3.0.0"

0 commit comments

Comments
 (0)