예제 #1
0
    private PlayInfo GetCrossRolls(PlayInfo _currentPlay)
    {
        PlayerData attacker = _currentPlay.Attacker;
        PlayerData defender = _currentPlay.Defender;

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

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

        return(ApplyBuffs(_currentPlay));
    }