Пример #1
0
 public void EscapeFromOpponent()
 {
     if (CombatService.EscapeOpponent(_player, _opponent) == CombatService.Combatant.Opponent)
     {
         _messageBroker.RaiseMessage($"You managed to run away from the {_opponent.Name}!");
         _opponent.EscapedFrom();
     }
     else if (CombatService.EscapedButHarmed(_player, _opponent) == CombatService.Combatant.Opponent)
     {
         _messageBroker.RaiseMessage($"You escaped from the {_opponent.Name}, but the monster was quick enough to hit you one last time!");
         AttackPlayer();
         _opponent.EscapedFrom();
     }
     else
     {
         _messageBroker.RaiseMessage("You were too slow to escape, the monster attacked you!");
         AttackPlayer();
     }
 }