public override bool Decide(StateController controller) { eventOccured = controller.CheckEventOccured(eventName); if (!eventOccured) { return(false); } if (chanceOfReacting == 1.0f) { return(true); } float chance = 1 - chanceOfReacting; float reactionRoll = Random.Range(0f, 1f); if (reactionRoll > chance) { return(true); } else { eventOccured = false; return(false); } }