Commit Graph

71 Commits

Author SHA1 Message Date
Austen McDonald 8973dc943b Add Configuration object. 2016-07-22 04:18:08 +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 53b25a85ed Add Module interface for Modules to extend from. 2016-07-21 06:40:51 +00:00
Basilius Sauter 77aab6f9cb Making bin/daenerys more extensible
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 #43
Closes #40
2016-07-19 18:01:46 +02: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 51a9582a3d Change version of the Game to be 0.1.0 2016-06-04 12:01:54 -07:00
Austen McDonald ad49ab05f8 Reorder use statements. 2016-06-04 12:01:54 -07:00
Austen McDonald 24b6b84742 Print core verison along with daenerys version 2016-06-04 12:01:54 -07:00
Austen McDonald 58808bcbee Add simple version string to Game. Probably want something more complex in the future. 2016-06-04 12:01:54 -07:00
Austen McDonald 385e57c427 Make module:register command work 2016-06-04 12:01:54 -07:00
Austen McDonald a1bd0d55c7 Add completion message to module:validate command 2016-06-04 12:01:54 -07:00
Austen McDonald c0a9a623b4 Add helpful messaging to ClassNotFoundExceptions in EventManager 2016-06-04 12:01:54 -07:00
Austen McDonald c30ceb0413 Add module:register command to daenerys 2016-06-04 12:01:54 -07:00
Austen McDonald 70bed16884 Add getPackageForLibrary to ComposerManager 2016-06-04 12:01:54 -07:00
Austen McDonald a73f4036a3 Add module:validate command to daenerys tool. 2016-06-04 12:01:54 -07:00
Austen McDonald aca3505aa1 Add getModuleManager() to Game 2016-06-04 12:01:54 -07:00
Austen McDonald 40383849b9 Oops, need this for ModuleManager::validate command. 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 3a70159557 Skeleton for a ComposerManager, to manage operations on the Composer config 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 91ac1ffd60 Skeleton of daenerys console application. 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 d69bf29607 Implement Buff Model 2016-05-25 22:13:18 +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
Basilius Sauter 80dcfe9972 Adds various needed classes for the battle system 2016-05-25 22:13:14 +02:00
Austen McDonald 090beed91a Fix reference to models directory in Boostrap. 2016-05-21 21:43:33 -07:00
Austen McDonald 8251e22784 Change configuration to use environment variables instead of globals. 2016-05-21 13:43:36 -07:00
Austen McDonald ca98a7337a Rename Game and Bootsrap methods to address feedback 2016-05-19 22:05:59 -07:00
Austen McDonald c60794511f Add Bootstrap as (at least temporary) way to construct a game. 2016-05-15 14:50:30 -07:00
Austen McDonald 5cce8f5a69 Add constructor for Game object. 2016-05-15 14:48:19 -07:00
Austen McDonald be0ea8fb09 Rename Game methods to be shorter, even if not following PHP conventions 2016-05-15 14:34:45 -07:00
Austen McDonald 9bb6137644 Remove GameInterface. I dont think we need this right now. 2016-05-15 14:27:57 -07:00
Austen McDonald 043c25ef85 Rebase and resolve conflicts, including updating tests
closes #16
2016-05-15 14:16:03 -07:00
Austen McDonald 4dfa46231c Fix bugs in ModuleManager 2016-05-14 21:08:57 -07:00
Austen McDonald bd21736687 Add Game object and a GameInterface for use with tests. 2016-05-14 21:06:23 -07:00
Austen McDonald f06299cc7f Change Module to have createdAt field 2016-05-14 21:06:23 -07:00
Austen McDonald 6988c3bd7a Add missing documentation to EventManager constructor 2016-05-14 21:06:23 -07:00
Austen McDonald 6d962453b6 Fix up typos and syntax errors and add tests to Event system 2016-05-14 21:06:23 -07:00
Austen McDonald 9ac276ca37 Add EventManager and related classes 2016-05-14 21:06:23 -07:00
Austen McDonald 8b8b7e5299 Add ModuleManager and basic module handling functionality 2016-05-14 21:06:23 -07:00
Austen McDonald 86816f8666 Add Module model and tests 2016-05-14 21:06:23 -07:00