Logic Gate Spells

at CAST then OTHERWISE

if MANA not CAST

if 10 then 0

execute ENEMY then CAST

execute HEALTH then cast

at CAST andor RANDOM

### Description

Spells that will cast the player's bolts or modify the player's mana points depending on certain criteria and conditions.

## Logic Gate Spells

Logic Gate spells are a group of **technical** utility spells which will allow the player to cast a **magical bolt** or **modify** their **mana points** based on whether or not the spell's **criteria** and dependencies are met.

Something that is worth noting is that certain Logic Gate spells which specify *"casting a bolt"* means that the **[casted] nbt tag** will be applied to the bolts that meet these requirements. For more technical terms, the nbt tag that is added to the bolts that the player fires allows certain "cast-reliant" spells like Quack Attack, Cast spells, and or Slime Launcher to initially cast.

## Unlock Method

In order for the player to unlock the Logic Gate spells, they must enter New Game+++ for the first time on a save file. Whether they win or die in that run afterwards will **not** effect the unlock condition.

Upon unlocking the Logic Gate spells, the player will find these spells occasionally spawning in the **second space** on the **Spell Board** in the Spell Shop. The chances for a Logic Gate spell to spawn is exactly **20%** when entering the Spell Shop and cannot be increased or decreased based on the Luck statistic.

## Spell Information

**at CAST then OTHERWISE -** When you cast this spell, it will cast a bolt every other cast.

* This spell will cast off of a **1:2 ratio** on the player's current cast count. This means that every **2nd** bolt that the player casts will be tagged with the usual *cast nbt tag*.

**if Mana not CAST -** When you cast this spell, it will cast a bolt as long as you have more than 999 mana points.

* This spell will tag the player's bolts with the usual *cast nbt tag* whenever their mana points is above 999.
* Playing as the Monarch affinity will still apply its **logic gate-effects**.

**if 10 then 0 -** When you cast this spell, it will set your mana points to 0 as long as you have less than 10 mana points.

* This Logic Gate spell is the only spell in the **spellgroup** which does not modify the player's *cast nbt tag*. Instead, it will modify the player's mana points.
* Certain Greek Letter spells such as Epsilon and Omega work exceptionally well with this spell as it allows the player to loop their mana points up to **100** continuously.

**execute ENEMY then CAST -** When you cast this spell, it will cast a bolt as long as there is an enemy nearby.

* This spell will tag the player's bolts with the usual *cast nbt tag* whenever there is an enemy nearby the player.
* The radius at which this spell will proc is **16 blocks**.

**execute HEALTH then CAST -** When you cast this spell, it will cast a bolt as long as you have under 5 hearts.

* The Lambda spell works well in conjunction with this spell as it gives the player more technical uses for their wand builds while not having to worry about mana.

**at CAST andor RANDOM -** When you cast this spell, it will cast a bolt at random.

* Similar to the *at CAST then OTHERWISE* spell, this spell tag the player's bolts with the usual *cast nbt tag* on a random occurrence. This random chance is a **25% chance** of occurring per cast.