Precognition

is a mental mutation that allows the player to foresee their near future, potentially allowing them to avoid unfortunate outcomes.

Precognition grants two activated abilities: "Precognition - Start vision" and "Precognition - End vision". Using the former creates a temporary save of the current game-state, places the ability on cooldown, and begins a "vision"; this vision will last for a mutation level-based number of rounds. The vision can be ended in one of three ways: by letting the vision run it's course, by choosing to end the vision early with the "End vision" ability, or by dying before the duration runs out.

If the vision ends either due to the duration running out or the player dying, they are prompted to "return to the start of their vision". Choosing will reload the save created when the vision was started, returning the game to the exact state as it was at that point. Choosing will cause the game to proceed as normal. This will kill the player if dying was what caused their vision to end. Choosing to end the vision early be using the "End vision" ability will immediately return to the player to the start of their vision.

Precognition functions entirely differently if used by a creature other than the player; when Precognition is activated, and the creature is killed before it's duration runs out, the creature will be revived with full HP, and the message log will return the following:

Amaranthine Prism
Precognition has a special interaction with the. If the player equips the amaranthine prism during a vision, returning to their start of the vision will cause the prism to be unequipped, making this one of the few legitimate methods of removing the prism after wielding it. However, this course of action will return the following message:

After this, the player will lose 100 reputation with highly entropic beings and 2-5 will spawn within 5-11 tiles of the player.

Should the player choose to wield the prism during a vision and forgo returning to the start, the prism will remain equipped as normal, and will be impossible to remove from then on.

Formulas
The following formula is used to determine duration of vision based on mutation level.

Advantages

 * Allows the player to essentially "cheat death" so long as they are able to use Precognition before they die
 * Allows the player to see in advance and potentially "reroll" some randomly determined outcomes, such as quest rewards
 * Can allow the player to scout out dangerous areas and revert to the start of their vision if they are unable to handle the dangers within

Disadvantages

 * High cost at character generation
 * Extremely long cooldown
 * Some random outcomes are pre-determined and cannot be rerolled, such as the choices presented when buying a mutation. (Though there are workarounds for this specific case.)
 * Unreliable at preventing death from unforeseen circumstances, such as sources of instant death