Commit Graph

5 Commits

Author SHA1 Message Date
Basilius Sauter 04b3b6aaf9 Changed character id to uuid 2018-10-08 17:29:44 +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
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