Artificial intelligent assistant

Coming up with a formula 100+100=100% I couldn't find the right phrases to google an answer to my question, but I am trying to come up with a formula and I have no idea how to. So I have a soccer player who has a physical stat of 100 and a happiness stat of 100, which means he is going to perform at 100% of his attributes. If one of the stats or both of them go down to lets say physical is 97 and happiness is 85 he should perform at n%. Not sure what the formula could be... and one more thing happiness should affect his performance less than the physical. So a player with physical of 100 and happiness of 90 will play better than a player with physical of 90 and happiness of 100

A simple way would be through a weighted average. Pick weights $w_1$ and $w_2$ between $0$ and $1$ such that $w_1 +w_2 = 1$, for example $w_1 = 0.7$ and $w_2 = 0.3$. Then $$\text{Performance} = w_1\cdot \text{Physical} + w_2\cdot \text{Happiness}.$$ You can play around with the weights to get something you like. The higher the weight, the higher the corresponding attribute is valued.

This can be extended to any number of attributes, just create weights $w_1, w_2,...,w_n$ then the performance is given by $$\text{Performance} = w_1\cdot \text{Attribute #1} + w_2\cdot \text{Attribute #2} + ... + w_n\cdot \text{Attribute #n}.$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8c943cd4a05ed91f86de422dfdd05455