Packages that are either of type lotgd-crate or lotgd-module can add daenerys commands and doctrine entity directories by using a lotgd.yml configuration file in their directory root (the same one were composer.json is).
All namespaces given in lotgd.yml have to be relative to the packages namespace, without a leading backslash (\).
Root namespace is derived from composer.json, either explicitely (via extra.lotgd-namespace) or implicitely via the first psr-4 or the first psr-0 namespace.
The bootstrap procedure has been updated to search through all packages to get the ones with an lotgd-namespace extra field. These are then tested if they have or have not a bootstrap class implementing BootstrapInterface. If yes, they get added to a stack used to modify the bootstrap procedure. For know, bootstrap supports additional entity directories.
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.
This commit adds the MotD model for storing and retrieving
messages-of-the-day.
It also adds a model for messages. Messages have an author as well as a
thread they belong to, the thread can be read by a specific number of
authors. FUrthermore, the message model supports system messages.
This commit introduces a number of needed changes:
- Character is now implementing the CharacterInterface
- MissingCharacter and SystemCharacter are supporting "pseudo-characters"
- trait MockCharacter implements non-implemented methods for
MissingCharacter and SytemCharacter
- Characters are now soft-deletable. Models wanting to load soft-deleted
characters need to fetch them eagerly.
Closes#17