Skip to content

v0.4.0

Choose a tag to compare

@koisland koisland released this 07 Mar 20:21
· 98 commits to main since this release

This update fixes bugs with battle effect order and adds battle visualization. These changes can be seen in PR #2.

Features

  • Added better battle visualization with DAGs.
    • Includes feature in .saptest.toml to disable graphs for performance.
  • Added team names to SapDB from the Team Names SAP wiki page.
  • Added random generation of team names for Team.
  • Added team field to Pet.
  • Added sold field to Team to store sold pets.
  • Added condition in Team::fight() that prevents Teams with identical names from fighting.
    • This is necessary for building the digraph.

Changes/Fixes

  • Changed Team::clear_team() to retain empty slots in middle of friends and push up the first pet if empty slots ahead of it.
  • Changed certain Action like the Experience and Profit variants to take args so Multiple not required.
  • Changed Clone impl for Team adds "_copy" suffix so each team always has a unique name.
  • Changed TeamEffects::trigger_effects() to be only for pet effects. Split item effects into TeamEffects::trigger_items().
  • Fixed Team::restore() to not invalidate previous Pet references.
  • Fixed bug where new Tiger abilities from repeat_effects_if_tiger() were not mapped to the effect pet causing the effects to be invalid.
  • Fixed bug in battle effect order where which side invoked Team::fight() would alter the battle outcome.
    • lhs.fight(rhs) != rhs.fight(lhs)
    • Fixed by correctly changing triggers to deplete by the team with the lowest attack pet at the front. Also fixed so item effects activate last.
  • Fixed bug with Chili not activating Knockout effects with Rhino/Hippo.
  • Removed some hard-coded actions like Action::Tapir and Action::Vulture with Action::Conditional actions.
  • Removed id arg for Pet::new() as unique Pet ids are now required.
  • Updated docs and benchmarks.