Enemy Variable Battle System

Hello Everyone,
I wanted to make a battle system, where the engine takes the player’s variables, like number of fighter, health, speed, etc., all variables that would affect the outcome of a battle between one player and an enemy squadron already assigned. So, if the player had 200 fighters and 1 frigate, and the enemy had 120 fighters, the player would win. I want the engine to be versatile, kind of like as seen in Enemy Database for RPG Battle System? - Questions & Answers - Unity Discussions
I just don’t understand how. If I could see an example script or two, any level of length, I would greatly appreciate it. Or, if someone could explain it in relatively simple terms, that would also be appreciated. Thank you, and have a nice day.

P.S. I use c#, but could, with some trouble, learn javascript

Thank you