Ejemplo n.º 1
0
    private PlayInfo GetDribbleRolls(PlayInfo _currentPlay)
    {
        PlayerData attacker = _currentPlay.Attacker;
        PlayerData defender = _currentPlay.Defender;

        _currentPlay.AttackerRoll         = ActionRoll.Dribble(attacker);
        _currentPlay.AttackingBonusChance = GetPlayerAttributeBonus(attacker.Tackling);
        if (_currentPlay.Marking == MarkingType.Close)
        {
            _currentPlay.AttackerRoll *= 0.75f;
        }

        if (defender != null)
        {
            _currentPlay.DefensiveAction      = PlayerAction.Tackle;
            _currentPlay.DefenderRoll         = ActionRoll.Tackle(defender);
            _currentPlay.DefendingBonusChance = GetPlayerAttributeBonus(defender.Tackling);
        }

        return(ApplyBuffs(_currentPlay));
    }