|
|
@ -12,8 +12,8 @@ class Combat < ApplicationRecord
|
|
|
|
left_hp = left_fighter.health_points
|
|
|
|
left_hp = left_fighter.health_points
|
|
|
|
right_hp = right_fighter.health_points
|
|
|
|
right_hp = right_fighter.health_points
|
|
|
|
|
|
|
|
|
|
|
|
left_fighter.health_points -= right_hp
|
|
|
|
left_fighter.get_hit(right_hp)
|
|
|
|
right_fighter.health_points -= right_hp
|
|
|
|
right_fighter.get_hit(left_hp)
|
|
|
|
|
|
|
|
|
|
|
|
if left_fighter.alive?
|
|
|
|
if left_fighter.alive?
|
|
|
|
self.winner = left_fighter
|
|
|
|
self.winner = left_fighter
|
|
|
|