Commit Graph

185 Commits

Author SHA1 Message Date
Austen McDonald ccf51450b0 Add property support for modules. 2016-08-21 03:58:35 +00:00
Vassyli cbcc606025 Adds a few test for Configuration
Adds a bunch of tests testing if InvalidConfigurationException is thrown as expected.
2016-08-12 08:24:43 +02:00
Austen McDonald 87c45f1fae Add simple tests for Actions and Attachments 2016-08-11 15:39:26 +00:00
Vassyli 0fecb32b57 Adds tailing dir seperator to %cwd% and adds tests 2016-08-11 12:05:18 +02:00
Vassyli 4e1fe65619 Moved %cwd% parsing to configuration and added test 2016-08-11 11:50:00 +02:00
Austen McDonald 921eb282a4 Add cwd or rootDir support back to the game so crates can configure where their composer root will live 2016-08-09 20:12:34 -07:00
Austen McDonald b360ca9ac6 Remove support for LOTGD_CONFIG environment variable. 2016-08-09 00:49:20 -07:00
Austen McDonald 9f698239b4 Add the ability to set a cwd on game creation 2016-08-09 00:42:45 -07:00
Austen McDonald 88cafacddb Refactor BootConfiguration into LibraryConfiguration and read all configuration for modules from it 2016-08-08 23:11:57 -07:00
Austen McDonald 05d14c8ba3 Refactor handleEvent() to pass in the Game always. 2016-08-02 21:28:19 +00:00
Austen McDonald d82f3fc588 Change hook for setting up viewpoint to handle all actions, data and attachments 2016-08-02 20:11:36 +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 6c8c12758f Add additional tests for Game and fix bugs 2016-08-01 10:04:35 +00:00
Austen McDonald a2fb425632 Fix bugs in Game and add some tests 2016-08-01 06:58:00 +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
Austen McDonald 1d24aa973f Change EventHandler to always pass by reference and kill return-value semantics. 2016-08-01 06:57:58 +00:00
Austen McDonald a4dd6a4a25 Fix missing directory separators in config file specifications. 2016-07-31 22:02:37 +00:00
Austen McDonald 5c7040d593 Add template to SceneBasics 2016-07-31 22:02:02 +00:00
Vassyli ae63c209e9 Clean-ups
Left overs to clean and changes from discussion.

Fixed config path finding
2016-07-29 11:57:24 +02:00
Vassyli 712a89bdad Changes for configuration file approach
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.
2016-07-29 09:35:46 +02:00
Vassyli ba855d9b56 Added root package to ComposerManager->getPackages() 2016-07-29 09:35:46 +02:00
Vassyli 396e174fb5 Add working directory search path for composer
Added a needed search path for composer.json and a test testing exactly this.
2016-07-29 09:35:46 +02:00
Vassyli f136711884 Adds changes as discussed in PR#50 2016-07-29 09:35:46 +02:00
Vassyli b93aea6831 Changed daenerys to support bootstrap for new commands 2016-07-29 09:35:46 +02:00
Vassyli 58147ed14b Updated bootstrap to call packages Bootstrap
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.
2016-07-29 09:35:46 +02:00
Austen McDonald 50ea982985 Fix configuration bug with new game settings and add tests 2016-07-28 13:20:16 -07:00
Austen McDonald 8e8b2de219 Make reading lotgd-namespace directories more generic, to support crates for example
Merges #49
2016-07-26 12:44:26 +02:00
Austen McDonald a37a0dbc89 Add translateNamespaceToPath to ComposerManager 2016-07-26 09:48:02 +00:00
Austen McDonald ffa65b3042 Change module configs to take lotgd-namespace and lotgd-subscriptions 2016-07-25 22:08:06 +00:00
Austen McDonald 3090dece7f Reorder use statements in ModuleManagerTest 2016-07-25 21:35:10 +00:00
Austen McDonald 0873121151 Change bootstrap to look for metadata directories from modules. 2016-07-25 21:35:09 +00:00
Austen McDonald 2370528392 Transition from environment variables to a configuration file format. 2016-07-22 04:19:10 +00:00
Austen McDonald 31c0f4341c Change format of module configuration to make them implement their events on a single calss. 2016-07-21 07:49:46 +00:00
Austen McDonald 6083e5c170 Add logger to Game, along with some basic log messages 2016-07-18 23:03:52 +00:00
Basilius Sauter 1132a731f5 Add API to extend annotation metadata directory
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
2016-06-20 22:40:42 +02:00
Basilius Sauter d4136909f8 Adds Lifetap and DamageReflection effects + tests
This commit adds buff effects for lifetap and damagereflection

Closes #35
2016-06-20 22:33:27 +02:00
Basilius Sauter a53ab601f5 Adds buff effects for regeneration and minions
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.
2016-06-09 23:31:24 +02:00
Basilius Sauter 7b609e3b5c Add attack/defense/damage modifiers and invuln.
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.
2016-06-09 23:31:23 +02: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 e35ae7dac1 Add additional tests for ModuleManager::validate 2016-06-04 12:01:54 -07:00
Austen McDonald 81d61f237d Adding validate method to ModuleManager with one successful test. More to follow. 2016-06-04 12:01:54 -07:00
Austen McDonald ed4832e31d Change ModuleManager to no longer have static methods 2016-06-04 12:01:54 -07:00
Austen McDonald c25556fed3 Change ModuleManager to take in a Game as a dependency provider 2016-06-04 12:01:54 -07:00
Austen McDonald 86426aacdb Store the module name along with event subscriptions 2016-06-04 12:01:54 -07:00
Austen McDonald 0d0458c87b Fix up tests with proper mocking of abstract package interface. 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