Nuclear Explosion

[[File:|80px]]Page in need of reworkThis page or section has been flagged for a need of a rework. This can be for a multitude of reasons, such as: poor quality, outdated information, lack of information, cumbersome writing, etc. Please update as soon as possible, click here to do so.
A **nuclear explosion**  is a destructive event in Hbm's Nuclear Tech Mod. IRL, a nuclear explosion is an extremely intense sudden release of energy created by a nuclear chain reaction in fissile materials, usually Uranium-235 and Plutonium-239, but it can also be done using Neptunium-237. This sudden an immense energy release creates a large fireball of super-heated plasma that is so hot it *easily* outmatches the temperature of the **core of the sun**. The heat can incinerate, melt, or otherwise severely burn anything nearby. The bright flash of light also created can permanently blind people who are too close and temporarily to those who are more distant. The fireball creates massive amounts of pressure that becomes a shockwave able to flatten cities, collapse deep bunkers, and scorch the Earth itself in mere seconds (IRL).

Most building blocks will be blown away with ease by a nuclear attack even if it isn't a direct hit, meaning very strong reinforced blocks will have to be used, see Bricks.

## Cause

### Fission

Fissile mass is usually Uranium-235 or Plutonium-239, but also sometimes Neptunium-237. It is a special type of radioactive element that upon absorption of a neutron, will split into two lighter elements, release energy, and more neutrons to hit more fissile atoms. This chain reaction results in an immense release of energy and thus the explosion. Although very little fissile mass actually undergoes the reaction and contributes to the yield of the overall device, it is still very much capable of delivering a destructive yield that ***by far*** exceeds that of a conventional bomb of the same size or even larger. Most devices are implosion type, where they use a sphere of fissile material called a core or pit that is surrounded by conventional explosive to compress it and begin the reaction. Gun-type fission bombs use conventional explosive to literally shoot a subcritical fissile projectile at another subcritical fissile target. They are far less efficient and usually can only use Uranium, but are simpler to construct.

### Fusion

Fusion fuel is usually Deuterium and/or Lithium, but sometimes Tritium can replace the Lithium. Both Deuterium and Tritium are isotopes of Hydrogen, they are used because they are easier to fuse together than normal Hydrogen, which can only happen in stars. Some devices use a hollow core with fusion fuel injected into it, these are not true fusion weapons, simply boosted fission ones. Virtually all Thermonuclear bombs use a Teller-Ulam design. This design is a two stage device, using a primary stage consisting of an advanced fission core and a secondary stage consisting of the fusion fuel. In layman's terms, upon a successful fission reaction in the first stage, the intense heat and pressure initiates the second stage and begins to fuse the atoms together, ***greatly*** boosting the device's total yield.

If the device uses Lithium instead of regular Tritium (most cases for long term storage), the shell of the device is lined with radiation reflectors (such as beryllium) which reflect the gamma and X-rays into the lithium, instantly breeding it into tritium on the spot.

### Salted

*Note: there are no pre-made neutron/salted bombs in the mod (such as a missile warhead or block based bomb), they can only be made with the Custom Nuke.*

A salted bomb or neutron bomb, technically referred to as an enhanced radiation weapon (ERW), is a nuclear device with material added that significantly increases the radioactive fallout and fission products (as opposed to a "clean" nuke where the intention is the opposite). They are usually used for area denial, so a region cannot be repopulated by any party. IRL, neutron bombs sacrifice yield for increased radiation, resulting in yields significantly lower than standard fission bombs. In NTM, neutron or salted bombs are simply nuclear devices that have a significantly stronger radiation release.

It is only recommended that a fission bomb use a salted stage, since a fusion stage reduces a salted stage's effectiveness by 75%.

## Aftermath

In NTM, the algorithm that handles nuclear explosions has 3 stages not including the animation.

The flash of the bomb can also damage entities and mobs by burning them and dealing intense damage.

### Stages

1. Calculation
	1. While the animation is running, the algorithm shoots out rays (geometric rays for scanning blocks, not actual visible rays) and uses intersecting blocks' blast resistance values to calculate whether or not it will should destroy it or not.
	2. It also calculates if the block in front of another will survive and if it will, it will also survive. In simpler terms, if there is a blast resistant wall and it survives, non-blast resistance blocks behind it will survive.
	3. Blast strength is like an exponential graph, extremely high at point blank (almost infinite) and eventually drops to very low levels where it can only blow out windows.
2. Block Removal
	1. After it has finished calculating what blocks will be destroyed or not, it will actually begin to remove them.
	2. Blocks are removed from the outside in in the shape of a torus. This effect means that furthest out blocks will be removed first and the blocks directly above and below ground zero will be removed last.
	3. Mobs caught in a block removal will be damaged and killed similar to the flash.
3. Fallout Wave
	1. After blocks have been removed, the final step of the algorithm is the fallout wave.
	2. It simulates intense radiation inflicted upon stone and other blocks. Stone and stone variants very close to ground zero become Hot Sellafite, medium range stone and its variants become regular Sellafite, everything else will be turned into Slaked Sellafite, which is not radioactive.
	3. Although typically it does not affect ores, it has a few exceptions. Coal ore has a chance to turn into diamond or emerald ore, (Nether) Uranium ore has a 1/100 chance to turn into Schrabidium ore, Uranium ore that doesn't transmutate becomes scorched. Sand (normal and red) has a chance to turn into Trinitite ore as well.
	4. Grass turns into Dead Grass and Mycelium turns into Glowing Mycelium (Glowing Mushrooms have a chance to spawn), Logs from trees or buildings become Charred Logs, and so do wooden planks. Anything flammable (leaves, wooden building blocks, tall grass, etc) will also be set on fire.
	5. Fallout will begin to form on the ground all around the afflicted area.

## Gallery

Crater from a different angle (Nuclear Charge, surface)Mere seconds after detonation, the flash, fireball, and shockwave can all be seen (Nuclear Charge, surface)HBM's Nuclear Tech Mod's New Nuclear Explosion EffectVideo demonstration of animation and partially destruction algorithm