コード例 #1
0
 public function makeDamage(Weapon $weapon)
 {
     $damage = Dice::nextStatic($weapon->getDamageRange()) + $weapon->getStrikeForce();
     $health = $this->getHealth() - $damage;
     $this->setHealth($health);
     return ['damage' => $damage, 'remaining_health' => $health];
 }