Requirement

From Noita Wiki
Jump to navigation Jump to search

The Requirement spells permit conditional casting of other spells. Their basic use skips or casts one (or more) spells on the wand based on one of three fixed conditions (Health, Projectile Count, and Enemy Count), or on an alternating basis (Every Other).

While they are free of mana cost, and available relatively early without needing to defeat any bosses, the multiple wand spell slots needed (up to three per condition) can limit their usefulness. Best used in synergy with other spells (and the wand wrapping effect) to enable more interesting behaviour.

Tips

  • By itself, one of Requirement: Enemies, Projectile Spells, Low Health, or Every Other will affect only a single spell to the right of it in the wand. This is not the case for Otherwise, which will only have an effect if followed by Endpoint.
  • You can use combinations of these spells to 'store' spells on a wand, see example wand below.
  • Requirement: Otherwise, or Requirement: End, in the last slot of a wand can cause the wand to wrap (similar to trailing modifiers). This may cause spells skipped by the condition to be cast when the wand wraps.
  • Has useful interactions with Add Trigger; see Expert Guide: Add Trigger Series.
  • Can help deal with excess draw, e.g., from Divide By spells; see Expert Guide: Divide By Spells.

Unlocking

Click to show content

The spells can be unlocked by taking one of the Stone Tablets (a specific type of reforged Emerald Tablet) over to the Alchemist's hut located at the eastern edge of the Lake. Throw the tablet into the hut, and enter the portal that appears there. The portal leads to a small room directly below, which if entered via the portal, will contain a powerful Experimental Wand, a selection of Requirement spells, and some furniture. The room also allows wand-editing within, on the first visit.

Behaviour

Basic Concepts

If you've any experience with programming the tl;dr is that these are like if/else statements that don't nest

Conditional logic is, at its' most basic, just a decision to do one thing or another based on the state of the world. This is useful if you want the flexibility of automatically varying the result of a process (wand cast), rather than having to make the decision to run one process or another (swap between wands).

These spells let you cast one spell or another based on some basic statements. If the statement is true, you get one set of spells, if it's false, you get another. In programming this is usually represented as an if...else statement (and the glyphs on the Requirement spells do translate to "if", "else" and "end") but the terminology isn't important - they either do one thing or another based on the state of the game at the moment they are cast.

They can be grouped into three types:

  • IF: Requirement If (Enemies, Projectile Spells, Low Health, Every Other)
  • ELSE: Else (Otherwise)
  • ENDIF: If (Endpoint)

The order these are used in matters - see Nested Requirements below for details.

Activation conditions

Name Skip if: Notes
Requirement Low Health Low Health hp > 25% Probably the most directly useful Requirement. Use it to trigger a healing spell (e.g. Circle of Vigour) to cast automatically only when losing health. Another use is in combination with Slow But Steady as a 'kill switch' on dangerous, constant-cast wands - if your health suddenly drops the requirement kicks in and adds 1.5s of delay.
Requirement Projectile Spells Projectile Spells nearby projectiles < 20 Can be used to trigger the use of Explosive Detonator, Spells To Black Holes, Circle of Shielding etc. as protection, or to switch between generating projectiles and consuming them in a Spells To Power wand build.
Requirement Enemies Enemies nearby enemies < 15 Very situational, e.g. automatically triggering area-of-effect spells, or expensive/limited use spells when in a tight spot. This can also be used to only enable the Essence To Power modifier when there's a significant number of enemies nearby to justify the mana cost.
Requirement Every Other Every Other last did not Every Other is somewhat special in that its' condition depends on how many times it has been cast previously. Since it can be cast more than once within a wand this enables some more advanced behaviour. Note: The counter is global, i.e. if you have Requirement Endpoint on two wands, they share a common 'every other' count.

Edge cases & peculiar effects

Wand wrapping

  • Requirement spells always draw a card, much like modifiers, and can cause a wand to wrap - however this can depend on whether the Requirement's condition is fulfilled or not.

Nested Requirements

In programming, you can 'nest' conditional statements (if...else) inside of each other. Requirements don't work like that.

  • When cast, Requirement If scans through the rest of the wand until it encounters one of: Endpoint, If, or the end of the wand (whichever comes first).
  • While doing this, it keeps track of the position of the last Else' it encountered.
  • If the If's condition to skip is true, it will start discarding spells starting with the first spell after itself. In order of preference it will stop after discarding the last Else encountered, the Endpoints that stopped the scan, or only discard the first spell after itself. This last case will happen if the scan is stopped by another If before seeing an Else or Endpoints, or if it is stopped by the end of the wand.
  • If the If's condition to skip is false, it will start discarding spells starting with the last Else encountered, if any. If there are no Else found by the scan it will not discard anything. If the scan found a Else there are three possibilities. If the scan was stopped by another If it will discard up to the end of the wand. If it was stopped by an Endpoints it will stop after discarding that. If it was stopped by the end of the wand, it will discard only the last Else encountered.
  • After discarding spells, the If will draw, which may wrap back into the discarded spells.
  • Summarized in a table, it looks like this:
Else is not encountered
Cause of scan termination condition to skip is true condition to skip is false
Endpoints discard the next spell of Requirement If .. Endpoints not discard anything
Requirement If only discard the next spell of Requirement If not discard anything
end of the wand only discard the next spell of Requirement If not discard anything
Else is encountered
Cause of scan termination condition to skip is true condition to skip is false
Endpoints discard the next spell of Requirement If .. first Else discard last Else .. Endpoints
Requirement If discard the next spell of Requirement If .. first Else discard last Else .. end of the wand
end of the wand discard the next spell of Requirement If .. first Else only discard last Else


Example 1:
Wand 0821.png
Shuffle
No
Spells/Cast
1
Giant Spitter Bolt
Giant Spitter Bolt
Requirement - Low Health
Spark Bolt
Spark Bolt
Requirement - Otherwise
Death Cross
Death Cross
Requirement - Enemies
Giga Nuke
Requirement - Endpoint
Giga Nuke
Result:

Here, the Requirement - Low Health will:

  • If the player's health is low, discard the Otherwise and everything after it, even the second Giga Nuke after the Endpoint, and draw the first Spark Bolt. Note that if the Giant Spitter Bolts and Spark Bolts weren't on the wand, the Otherwise and first Death Cross would be cast instead.
  • Otherwise, discard the Spark Bolts and Otherwise and draw the first Death Cross. The Requirement - Enemies will operate normally.
Example 2:
Wand 0821.png
Shuffle
No
Spells/Cast
1
Giant Spitter Bolt
Giant Spitter Bolt
Requirement - Low Health
Spark Bolt
Spark Bolt
Death Cross
Death Cross
Requirement - Enemies
Giga Nuke
Requirement - Endpoint
Giga Nuke
Result:

Here, the Requirement - Low Health will:

  • If the player's health is low, discard nothing and draw the first Spark Bolt.
  • If the player's health is not low, discard only the first Spark Bolt and draw the second.

The Requirement - Enemies will operate normally.

A workaround to the limitation of nesting is to cast the inner If indirectly through Alpha or Gamma, since greek letters will not interrupt the scan. However any Else's and Endpoints's following the Alpha/Gamma will be shared.

Example 3:
Wand 0821.png
Shuffle
No
Spells/Cast
1
Giant Spitter Bolt
Giant Spitter Bolt
Requirement - Low Health
Spark Bolt
Spark Bolt
Requirement - Otherwise
Death Cross
Death Cross
Gamma
Giga Nuke
Requirement - Endpoint
Giga Nuke
Requirement - Enemies
Result:

Here, the Requirement - Low Health will:

  • If the player's health is low, discard the Otherwise up to and including the Endpoint, then draw the second Giga Nuke.
  • Otherwise, discard the Spark Bolts and Otherwise and draw the first Death Cross. Gamma will behave as a normal Requirement - Enemies.
Example 4:
Wand 0821.png
Shuffle
No
Spells/Cast
1
Giant Spitter Bolt
Giant Spitter Bolt
Requirement - Low Health
Spark Bolt
Spark Bolt
Death Cross
Death Cross
Gamma
Giga Nuke
Requirement - Endpoint
Giga Nuke
Requirement - Enemies
Result:

Here, the Requirement - Low Health will:

  • If the player's health is low, discard nothing and draw the first Spark Bolt. Gamma will behave as a normal Requirement - Enemies.
  • If the player's health is not low, discard up to and including the Endpoint, and draw the second Giga Nuke.

Usage Examples

Every Other

Example 5:

Use the same modifiers/triggers with two alternating payloads

This concept was originally devised by Priskip. It enables continuous spawning of enemies, including Jättimato which might drop an Extra Max Health. (Note: it is no longer possible to spawn Leggy Mimics, as of April 2021. As of March 2023 this is again possible if unlocked by killing a Leggy Mimic.)

Wand 0821.png
Shuffle
No
Spells/Cast
1
Long-Distance Cast
Warp Cast
Requirement - Every Other
Double Spell
Nolla
Projectile Transmutation Field
Spark Bolt
Requirement - Otherwise
Teleporting Cast
Nolla
Piercing Shot
Add Trigger
Circle of Unstable Metamorphosis
Touch Of Smoke
Requirement - Endpoint
Double Spell
Chainsaw

More details (on an earlier version of this wand concept) are explained in the following video by Priskip and LetsSufferTogether:

Use Gamma on two different spells

Gamma calls the spell at the end of the deck if the deck is not empty, and otherwise calls the spell at the end of the hand if it is not empty. By discarding the end of the deck, its selection can change. E.g., the following wand build takes advantage of peculiarities of Requirement spells to alternate between casting Circles of Vigor and Black Holes with zero uses left on these spells.

Example 6:
Wand 0821.png
Shuffle
no
Spells/Cast
1
Double Spell
Requirement - Every Other
Gamma
Circle of Vigour
Requirement - Otherwise
Requirement - Enemies
Black Hole

An simpler way to achieve a similar effect is simply by using a shuffle wand[1]. The Requirement approach does allow keeping all nonshuffle wands and some extensibility, though, such as attaching to a travel wand:

Example 7:
Wand 0821.png
Shuffle
no
Spells/Cast
1
Add Mana
Add Mana
Quadruple Spell
Nolla
Small Teleport Bolt
Requirement - Every Other
Gamma
Chainsaw
Circle of Vigour
Requirement - Otherwise
Requirement - Enemies
Black Hole

Mana management: cast expensive spells every other time (high-multicast wands)

Example 8:

In this example Every Other is used to lessen the mana drain by not casting the expensive spells half the time. This works best on rapidly firing wands, as it also halves your effective fire rate.

Wand 0153.png
Shuffle
No
Spells/Cast
13
Requirement - Every Other
Giant Spitter Bolt
Giant Spitter Bolt
Giant Spitter Bolt
Giant Spitter Bolt
Giant Spitter Bolt
Giant Spitter Bolt
Requirement - Endpoint
Add Mana
Add Mana
Add Mana
Add Mana
Chainsaw

Mana management: cast expensive spells only every fourth time (single-cast wands)

Example 9:

This design would work on a wand with 0 mana regeneration; the Add Mana is cast 4 times for every time that the 4 Luminous Drills are cast, precisely offsetting their cost. If the wand had at least 60 mana regeneration per second, a Chainsaw could be used instead of Water without running out of mana. In either case, the recharge time is reduced only by 0.34 seconds (2x Water/Chainsaw per recharge), not 0.68 seconds.

Wand 0821.png
Shuffle
No
Spells/Cast
1
Add Mana
Water
Requirement - Every Other
Luminous Drill With Timer
Luminous Drill With Timer
Luminous Drill With Timer
Luminous Drill With Timer
Requirement - Endpoint

Usage Examples - Storage

Use contradicting requirements to always skip spells

Example 10:

Also works with Requirement: Projectile Spells and Requirement: Enemies - they just need to both be the same. Since the requirement condition can't be both true and false at once the spells inside will never be cast. However, certain peculiarities in implementation mean that there must be spells available to wrap to, either before the first If, or between the first If and the Otherwise, or else the unwanted spells will be cast. (Placing a spell after the Endpoint doesn't work; if the condition is satisfied, the spell past the Endpoint will still be discarded, and the wand will wrap and cast spells from the storage.) This does require more wand slots than using Wand Refresh for storage, but also costs no mana and may be a useful option before you get multiple copies of Wand Refresh. This storage design also requires careful counting of draw, as too much draw may start casting the discarded spells from storage.

Wand 0821.png
Shuffle
No
Spells/Cast
1
Bubble Spark
Requirement - Enemies
Requirement - Otherwise
Requirement - Enemies
Giga Nuke
Giga Nuke
Requirement - Endpoint

Resource-friendly, less caster-friendly design

Example 11:
Wand 0821.png
Shuffle
No
Spells/Cast
1
Bubble Spark
Requirement - Every Other
Requirement - Every Other
Spark Bolt
Death Cross
Requirement - Endpoint

Depending on the Every Other toggle's current state, either:

  • Case A: The first Every Other will discard the second, and the storage spells will be cast. Next cycle will be in case B.
  • Case B: The first Every Other won't discard anything, and the second Every Other will discard the storage spells, and its draw will wrap to the Bubble Spark. Next cycle will also be in Case B.

So after setting the Every Other toggle in the right state, this should continue to operate as storage (Case B), unless Every Other is cast from another wand and requires resetting the toggle to the right state. To initialize or reset the toggle in the right state, cast this wand with safe spells in the storage first. However, as with other Requirement-based storage designs, any extra draw may start casting spells from inside the storage.

(The Bubble Spark could also be moved to the end in this design.)

History

  1. Idea and testing sfwaltaccount on Reddit