Commit Graph

38 Commits

Author SHA1 Message Date
Basilius Sauter 94e18b8d11 Increases windows compability by removing microtime from tests 2017-01-04 08:26:10 +01:00
Austen McDonald e041db89bc Add Viewpoint::removeActionsWithSceneId for easier writing of scenes without default nav items 2016-12-31 14:00:30 -08:00
Austen McDonald 340d6d18fa Rename CharacterViewpoint to Viewpoint
As I was writing the documentation, this just feels like added complexity that we don't need.
2016-11-11 14:06:26 -08:00
Austen McDonald 4c5e1429b6 Build support for multiple parents (graph of scenes instead of tree) 2016-10-31 09:22:31 -07:00
Austen McDonald be543bb630 Add addActionToGroupId 2016-09-17 06:14:03 +00:00
Austen McDonald 798490fe20 Add findActionGroupById 2016-09-17 06:01:18 +00:00
Austen McDonald faf699eb3f Remove extra whitespace in CharacterModelTest 2016-09-16 05:26:36 +00:00
Austen McDonald 4d61bbd348 Make properties cascade=remove for Character and Module 2016-09-16 05:26:19 +00:00
Austen McDonald f7e34162e8 Rename CharacterViewpoint::getActions() to CharacterViewpoint::getActionGroups() b/c that's what it is 2016-09-04 06:08:00 +00:00
Austen McDonald c585dcb33a Fix bug in Scene constructor 2016-08-30 20:40:09 +00:00
Austen McDonald 86751fc6d5 Refactor ModelTestCase so I can use it outside of the Core. 2016-08-22 14:30:22 -07:00
Austen McDonald ccf51450b0 Add property support for modules. 2016-08-21 03:58:35 +00:00
Austen McDonald 87c45f1fae Add simple tests for Actions and Attachments 2016-08-11 15:39:26 +00:00
Austen McDonald 36c57cf9cb Refactor the method to be get/setViewpoint() instead of get/setCharacterViewpoint for simplicity 2016-08-01 21:28:01 +00:00
Austen McDonald 3c3f5c970c Change Character to no longer handle creating its own CharacterViewpoint if it's empty 2016-08-01 06:57:59 +00:00
Basilius Sauter 4badaea249 Introduce general buff handling and tests
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.
2016-06-09 23:31:22 +02:00
Austen McDonald 86426aacdb Store the module name along with event subscriptions 2016-06-04 12:01:54 -07:00
Basilius Sauter 931d60b907 Removes uneeded filters from code base 2016-05-26 08:14:23 +02:00
Basilius Sauter 5fd7a0a9df Updated BattleClass to use BattleEvents
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.
2016-05-25 22:13:19 +02:00
Basilius Sauter 00f7d2ca5d Adds additional tests for exceptions 2016-05-25 22:13:17 +02:00
Basilius Sauter 2609d67e38 Added more methods to the Battle class and tests
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.
2016-05-25 22:13:16 +02:00
Basilius Sauter 38068dd0a5 Completed basic battle system.
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.
2016-05-25 22:13:15 +02:00
Austen McDonald f06299cc7f Change Module to have createdAt field 2016-05-14 21:06:23 -07:00
Austen McDonald 86816f8666 Add Module model and tests 2016-05-14 21:06:23 -07:00
Basilius Sauter 0ff9958830 Adds MotD and Message model as well as tests
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
2016-05-12 11:04:04 +02:00
Basilius Sauter 53d82646bf Refactored CharacterScene as CharacterViewpoint
closes #15
2016-04-29 19:03:48 +02:00
Basilius Sauter 7b21baee37 Introduction of the GameConfiguration model
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.
2016-04-27 22:51:16 +02:00
Basilius Sauter d59c08b60d Added a comment 2016-04-25 19:53:16 +02:00
Basilius Sauter 0692a977f2 Added additional tests to test the change of Scene. 2016-04-25 19:38:59 +02:00
Basilius Sauter dddaebbe0b Added additional test 2016-04-25 19:30:55 +02:00
Basilius Sauter 6edd4cf9b1 Implemented Character->getCharacterModel() 2016-04-25 19:25:25 +02:00
Basilius Sauter 9986420b10 Minor fixes and changes
The tests are now using sqlite inside of the memory. This ensures a
creation of the database every time the tests are run.
Added some additional tests for probing database persistance.
Removed outdated code.
2016-04-20 18:11:59 +02:00
Basilius Sauter 6a72a43cda Model changes
Adds basic Scene model
Extends Character model with reusable properties (Using the two traits
Properties and PropertyManager).
2016-04-19 21:51:40 +02:00
Basilius Sauter 3fbfc7692f Improved Tests and CharacterModel 2016-04-16 09:13:07 +02:00
Basilius Sauter ac7c845d07 Added Deletor trait. 2016-04-16 07:30:03 +02:00
Basilius Sauter 7afa27246b Added strict_types=1 and added test 2016-04-15 18:56:08 +02:00
Basilius Sauter 5a405fc2db Model support for character creation 2016-04-15 18:16:35 +02:00
Austen McDonald a7d761d4da Cleanup formatting in composer.json and rename Tests to tests 2016-04-14 21:31:22 -07:00