Commit Graph

277 Commits

Author SHA1 Message Date
Austen McDonald c9e69704f7 Add information about contributors and contributing 2016-05-25 21:33:45 -07:00
Basilius Sauter a33ec55566 Removes uneeded filters from code base 2016-05-26 00:06:31 +02:00
Basilius Sauter 14b38b57db Merge pull request #21 from lotgd/feature/fight
Adds a basic battle system
2016-05-25 23:40:03 +02:00
Basilius Sauter e7c28529d1 Merge branch 'feature/fight' of https://github.com/lotgd/core into feature/fight
Merge pull request #21
2016-05-25 22:16:09 +02:00
Basilius Sauter e1652e4ff7 Merge branch 'feature/fight' of https://github.com/lotgd/core into feature/fight 2016-05-25 22:14:35 +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 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
Basilius Sauter 80dcfe9972 Adds various needed classes for the battle system 2016-05-25 22:13:14 +02:00
Basilius Sauter e04d963633 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 11:30:57 +02:00
Austen McDonald d1ed6bfe77 A couple changes that make first time setup easier
Merge pull request #22 from nekosune/patch-1
2016-05-24 09:22:31 -07:00
Katrina Swales 2229d3e07d A couple changes that make first time setup easier 2016-05-24 16:35:53 +01:00
Basilius Sauter fb2c764e15 Implement Buff Model 2016-05-24 17:03:30 +02:00
Basilius Sauter 4e22b83dda Adds additional tests for exceptions 2016-05-23 18:28:30 +02:00
Basilius Sauter 3e2ea99b1f 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-23 18:19:01 +02:00
Basilius Sauter a8098af488 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-23 16:29:15 +02:00
Basilius Sauter 820272ed93 Merge remote-tracking branch 'origin/master' into feature/fight 2016-05-23 14:11:38 +02:00
Basilius Sauter e7892db46b Adds various needed classes for the battle system 2016-05-23 14:07:04 +02:00
Austen McDonald 090beed91a Fix reference to models directory in Boostrap. 2016-05-21 21:43:33 -07:00
Austen McDonald e2c97d21f9 Add composer/composer as dependency (and pedantically reorder some deps). 2016-05-21 21:42:52 -07:00
Austen McDonald 78695eb52d Remove extra cache clear statement in tests. 2016-05-21 13:46:01 -07:00
Austen McDonald 8251e22784 Change configuration to use environment variables instead of globals. 2016-05-21 13:43:36 -07:00
Austen McDonald 01cc817913 Update composer.json to include metadata (and update installed versions) 2016-05-20 21:32:26 -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 9583865f70 Update composer modules 2016-05-14 21:31:40 -07:00
Austen McDonald da069c357e Add ModuleManager tests 2016-05-14 21:08:57 -07:00
Austen McDonald 4dfa46231c Fix bugs in ModuleManager 2016-05-14 21:08:57 -07:00
Austen McDonald e45b0ee694 Fix some bugs in ModelTestCase, including clearing the cache 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
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 2bb9bca69e Fix for dicebag test
dicebag tests asserts now for >= and <= instead of > and < since the edge
cases can happen from time to time as well.

closes #14
2016-04-28 22:58:05 +02:00
Basilius Sauter 5b86099bcc Adds GameConfiguration Model
Adds GameConfiguration Model which itself is a container for the
GameConfigurationElement entity. The GameConfiguration model makes use of
the introduces OneToManyCollection which implements the Collection
interface of the Doctrine library.

Closes PR #13
2016-04-28 18:35:46 +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