public bool sanCheck(float mindMod) { bool passed = false; mindMod = mind.finalValue * mindMod / HP.finalValue; mindMod += 10; if (Random.Range(0, 100) < endurance.finalValue) { mindMod /= 2; passed = true; } mindMod = Mathf.Floor(mindMod); mind.lose(mindMod); return(passed); }