I'm working on building a 'result table' for an RPG. In said table, you compare an effect rating to a resistance rating, to find a whole number result.
Essentially, for each cell I need to find Z, where:
- Z is some proportion of the difference between X and Y
- Z is at least one even if X=Y
- Z never exceeds X
- Z is never =X unless Y=0
For the purposes of result, cases where X<=Y are not important (as they will be considered null results), and the complexity of the formula is not an issue as it will not be used in play, though it would be ideal if it can easily put into terms of a Google Sheets formula.
I've tried a few simple ones myself from another similar design, but all seem to fail at #2 or #3. I suspect the original design may simply have been hand-tuned, but a consistent formula would be nice.