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
This commit introduces the GameConfiguration, a model that is not an
entity. It also introduces GameConfigurationElement which is a doctrine
entity.
The two models make use of the traits introduced for CharacterProperty.
They also use the new OneToManyCollection class, which implements the
doctrine collection interface to a certain, limited extend. It mimicks
doctrine's PersisentCollection.