swlegion 0.4.0 swlegion: ^0.4.0 copied to clipboard
JSON-Serializable Data Model and Card Database for Star Wars: Legion
0.4.0 #
Large set of breaking changes and new content!
Catalog #
- Renamed
database.dart
tocatalog.dart
. See the top-level fieldcatalog
.
Data Model #
- Added
surge_override
(AttackSurge
) field toWeapon
. - Significant data model change for
Keyword
, now split into 3 new classes. - Changed the default
serializers
to always use standard JSON, fixed encoding issues that would cause issues with Firebase or other database formats that expect valid JSON. Seelib/catalog.json
for example output. Use the exportedCustomJsonPlugin
instead ofStandardJsonPlugin
. - Added
ForceAlignment
(instead of justFaction
).
Holodeck #
Holodeck
is now a utility class for executing simulations.- The existing database structure and reference lookups were moved to
Catalog
.
0.3.1 #
Database #
- Added Chewbacca Operative Expansion.
- Added Wookie Warriors Expansion.
- Fixed the ID of Battle Meditation.
- Added
keywords
to upgrades that provide them on active or passively.
Holodeck #
costOfUnit
now treatsupgrades
as a@required
named parameter.- Added
totalMiniatures(unit, {Iterable<Reference<Upgrade>> upgrades})
.
0.3.0 #
Data Model #
- Corrects
Upgrade
to only compare based on.id
. Indexable.toRef
is now optional, as anIndexable
is also aReference
.
Database #
- Normalized all enum IDs as
lower-hyphenated-case
. - Added
.from
to every enum, to use instead ofvalueOf
. - Added
.toString()
toReference
to aid in debugging. - Added missing
.isUnique = true
for commanders/operatives. - Upgrade emergency stims now has a corrected ID of
emergency-stims
. - Created
Commands
,Units
,Upgrades
,Weapons
classes for convenience:
import 'package:swlegion/database.dart';
void main() {
print(Units.stormtroopers.points); // 44
}
Mechanics #
- Added a new
class
,Holodeck
, for game logic and helper functionality that is not strictly tied to the database nor to the serialized JSON model(s):
import 'package:swlegion/database.dart';
import 'package:swlegion/swlegion.dart';
void main() {
// Can create a `Holodeck` using the provided data:
final customDeck = Holodeck(
commands: commands,
units: units,
upgrades: upgrades,
);
// Or use the default `Holodeck` directly.
print(holodeck.validUpgradesForUnit(Units.stormtroopers));
}
0.2.0 #
Data Model #
- Moved
Army
andArmyUnit
out of this package. CommandCard
was added.- Replaced
*Key
instances with a singleReference<T>
instance.CommandCard
,Unit
,Upgrade
all now implementIndexable<T>
.Upgrade
's.restrictedToUnit
is now aBuiltSet<Reference<Unit>>
.
Database #
- Added
'Emergency Stims'
(Gear), which was accidentally omitted. - Fixed the cost of
'Estmeed Leader'
(Command), which is 5 points not 10. - Fixed the ID of
'Esteemed Leader'
, which was mis-spelled. - Added
CommandCard
(s) for every existing commander and operative.
0.1.0 #
- Initial stable release.