Skip to content

v0.8.0

Compare
Choose a tag to compare
@Trisfald Trisfald released this 06 Jul 17:54
· 38 commits to master since this release

Features

Improvements to CharacterRules.

The new methods on_character_added and on_character_transmuted can be used to define specific behaviors when an entity is added or removed from the battle.

Client and Server are now Send.

This change should help integrate weasel into multithreaded game. Both client and server can now be sent between threads.
Notice: there are additional Send requirements on some traits.

Added accessors to flat event structures.

FlatVersionedEvent and FlatClientEvent now have methods to access their internal fields.

Added counters for rounds and turns in Rounds and an EndTurn event.

Added counters for rounds and turns in Rounds. These can be accessed with completed_rounds and completed_turns.
The rounds counter is automatically increased by the library. The turns counter, instead, must be manually increased by firing an event of type EndTurn.
The metric ROUNDS_STARTED was removed as its functionality is now covered by completed_rounds.

Multiplayer example.

The new example 'King of the hill' is a card game with multiplayer over network for three players.

Introduced BattleController trait.

This new trait allows the user to write generic code around structure that have ownership of a Battle object.
The trait is implemented by Client and Server.

Bug fixes

  • Fixed a bug for which CREATURES_CREATED and OBJECTS_CREATED had the same internal id.