In my game I ant to use two formulas when calculating an attack:
1 - Chance to hit - it is solely based on the skills of the attacker and results in percentage chance
2- Actual attack formula, which determines if that attack actually hit it's target, if it is criticall hit or if target dodged that attack altogether. And it is based on weapon type, skills of both attacker and defender and luck factor. But I want this formula to check only if Chance to Hit formula resulted in sucessfull hit.
Is it possible to implement these two formulas this way? I guess I should use a chance fork for that and use first formula in it? If so, where should be first formula in it?
And will it be possible to use my second formula after that, because in it I can get Attack and Evade values between 0-35 and I want to compare them - if attack is bigger or equal than evasion, then it's normal hit. If it is lower, then defender dodged attack and if attack value is 2x bigger than evade value, then it should be a critical hit.