Skip to content
Snippets Groups Projects
Commit 5f1aae9a authored by Max Cherris's avatar Max Cherris
Browse files

Update Unit

parent 15684454
Branches unit-branch
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ Unit::Unit(std::string name, int health, int speed, int attack, std::pair<int, i ...@@ -5,7 +5,7 @@ Unit::Unit(std::string name, int health, int speed, int attack, std::pair<int, i
//TODO: IF necessary, implement scaling attack by remaining health //TODO: IF necessary, implement scaling attack by remaining health
void Unit::init_combat(Unit defender) void Unit::init_combat(Unit &defender)
{ {
//Attacker gets first move, inflicts its damage upon the the defender //Attacker gets first move, inflicts its damage upon the the defender
defender.setHealth(defender.getHealth() - this.getAttack()); defender.setHealth(defender.getHealth() - this.getAttack());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment