#include "combat.hpp"
#include "rand.hpp"

namespace components {
  int Combat::attack(Combat &target) {
    int attack = Random::uniform<int>(0,1);
    int my_dmg = 0;

    if(attack) {
      my_dmg = Random::uniform<int>(1, damage);
      target.hp -= my_dmg;
    }

    return my_dmg;
  }
}
