In order to make bin/daenerys more extensible and usable from outside with
more configuration, the bootstrap of the game object has been moved to
bin/daenerys where it is a closure stored in LotGD\Core\Console\Main.
Commands now call Main::createGame() instead of Bootstrap::createGame().
Added the command database:init
Merges #43Closes#40
This commit adds the possibility for externals to add additional
directories in order to extend the directories doctrine uses to read
metadata from.
Closes#39
This commit adds support for regeneration (both regen and deregen) and
minions (for both goodguy or badguy - or both at the same time). It also
adds tests to ensure correct code workflow.
Adds attack, defense and damage modifiers for both "goodguy" (self) and
"badguy" (target) as well as a handler for goodguy/badguy invulnurability.
Modified the battle calculation to not recalculate if noone does damage as
long as at least 1 buff is active. This prevets infinite loops.
This commit introduces basic buff handling: Adding buffs, removing buffs,
expiring buffs. The Battle procedure controls the buffs and activates them
every round, expires them one round per round and removes the buff if the
number of rounds left is 0.
The BattleTest suite tests for the correct sequence and the correct
messages.
Implemented BattleEvents from @austenmc's old branch.
Added an empty Buff-Model as well, as well as a BuffList.
@ToDo: Add events, and add buff calculations to the battle class.
This PR will, however, only introduce the basic battle class, buffs will
come in another patch.
If a battle is over or not can now be tested using this->isOver(). If the
battle is over, battle->getWinner() can be used to get the winner of this
fight, battle->getLooser() for the looser.
The class Battle takes two participants (player and monster) that both
need to implement the FighterInterface. Right now, rounds are
completed by the fightNRounds method.
Since all enemies in the old code follow the same default scaling,
monsters and masters use a AutoScaleFighter trait for now.