There's been some discussion here and in the past about implementing a luck variable. One impediment is the complications involved in adding a new stat, etc. As one who believes you make your own luck, it occurs to be that a luck function could be more simply implemented by using a combination of existing stats. For general luck I suggest some formula combining INT, WIS, and CHR.

For example...you could define luck = Avg(INT+WIS+CHR) and compare that to a 1d20 roll. If "luck">= 1d20 then you got lucky.

Disagree with this. Gave is based on DnD 2nd edition or so. There is already constant luck in the code. Every combat roll, every saving throw, etc. All of it is relevant. All of it is dice rolls, which means all of it is luck based.

Now, your formula is very similar to the Ego score that happens with intelligent equipment. VERY close. I wouldn't mind that displaying for reference on attributes or something.