Exemplo n.º 1
0
        public void AttackOpponent()
        {
            if (_player.CurrentWeapon == null)
            {
                _messageBroker.RaiseMessage("You must select a weapon, to attack.");
                return;
            }

            _player.UseCurrentWeaponOn(_opponent);

            if (_opponent.IsAlive)
            {
                AttackPlayer();
            }
        }
Exemplo n.º 2
0
        //need to fix the "enough stamina" part, for now it's 2 instead of StaminaCost

        public void AttackOpponent()
        {
            if (_player.CurrentStamina < 2)
            {
                _messageBroker.RaiseMessage("You must have enough Stamina, to use a weapon.");
                return;
            }
            if (_player.CurrentWeapon == null)
            {
                _messageBroker.RaiseMessage("You must select a weapon, to attack.");
                return;
            }

            if (_player.CurrentWeapon != null)
            {
                _player.UseCurrentWeaponOn(_opponent);
            }

            if (_opponent.IsAlive)
            {
                AttackPlayer();
            }
        }