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.darttocatalog.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
serializersto always use standard JSON, fixed encoding issues that would cause issues with Firebase or other database formats that expect valid JSON. Seelib/catalog.jsonfor example output. Use the exportedCustomJsonPlugininstead ofStandardJsonPlugin. - Added
ForceAlignment(instead of justFaction).
Holodeck #
Holodeckis 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
keywordsto upgrades that provide them on active or passively.
Holodeck #
costOfUnitnow treatsupgradesas a@requirednamed parameter.- Added
totalMiniatures(unit, {Iterable<Reference<Upgrade>> upgrades}).
0.3.0 #
Data Model #
- Corrects
Upgradeto only compare based on.id. Indexable.toRefis now optional, as anIndexableis also aReference.
Database #
- Normalized all enum IDs as
lower-hyphenated-case. - Added
.fromto every enum, to use instead ofvalueOf. - Added
.toString()toReferenceto aid in debugging. - Added missing
.isUnique = truefor commanders/operatives. - Upgrade emergency stims now has a corrected ID of
emergency-stims. - Created
Commands,Units,Upgrades,Weaponsclasses 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
ArmyandArmyUnitout of this package. CommandCardwas added.- Replaced
*Keyinstances with a singleReference<T>instance.CommandCard,Unit,Upgradeall now implementIndexable<T>.Upgrade's.restrictedToUnitis 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.