This question already has an answer here:
Is it okay to copy a game's formula? Formulas like damage formulas, taking the stats STR, DEX, INT, critical rate, etc. into account. Specifically I want to copy Ragnarok Online's damage calculation. But I will probably remove some stuff from the formula to reduce the scope of my game.
Your question has been identified as a possible duplicate of another question.
I think game formulas and the like are different from game mechanics. Game mechanics is how the game is played.