The CBomb, or Conversion Bomb, is a bomb that when activated will convert creeper in a range around the unit into anticreeper.
The Conversion Bomb must be fully charged with ammunition in order to function. When charged, it will change to a glowing purple/orange look.
Now, it can be detonated in one of two ways - selecting it and pressing the Destroy button, or moving it into creeper and allowing it to succumb to the damage.
The Conversion Bomb's detonation range depends on how intact the bomb is at the time of detonation. If at least 50% or more of the unit is assembled at its location, the explosion range will be maximized. If not enough of the unit has managed to reassemble due to pixels in transit being damaged, the range of the explosion will be severely reduced, or the explosion may not occur at all.
Unit JSON
Unit JSON
{ "type": "unit", "displayname": "CBomb", "permanentinventory": true, "image": "body.png", "position": [0, 0], "pivot": [0.5, 0.5], "movable": true, "maxammo": 250, "parts": [ {"part": "armed.json", "name": "armed", "position": [0, 0], "active": false}, ], "controllers": [ {"name": "ondestroy_sandexplosion"} ], "scripts": [ {"name": "cbomb.irpl"} ] }
The associated cbomb.irpl script:
$RANGE:30 if (<-armed !) if (GetAmmo(self) GetMaxAmmo(self) >=) SetActive(<-armedPart true) true ->armed endif endif :Awake GetChild(self "armed") ->armedPart false ->armed :Destroyed if (GetAmmo(self) GetMaxAmmo(self) >=) GetAllPixelCount(self) ->pixelCounts <-pixelCounts[0] ->pixel_none <-pixelCounts[1] ->pixel_onboard <-pixelCounts[2] ->pixel_inroute <-pixelCounts[3] ->pixel_dead <-pixel_onboard <-pixel_dead + ->pixel_total if (<-pixel_total eq0) 0 ->percentComplete else <-pixel_total <-pixel_inroute - <-pixel_total asfloat / ->percentComplete endif #DebugAllSp("NONE:" <-pixel_none "ONBOARD:" <-pixel_onboard "INROUTE:" <-pixel_inroute "DEAD:" <-pixel_dead "TOTAL:" <-pixel_total) #DebugAllSp("% Complete: " <-percentComplete) GetPosition(self) ->pos ConvertCreeperToAC(<-pos.x <-pos.y <-RANGE <-percentComplete * false) endif
Ships | Apex Ship • Coilship • Cryon • Defender • Digger • Duster • Frigate • Gunship • Maker • Part Ship • Spirit Ship |
Other Player Units | CBomb • Dark Echo • Darkling • Nullifier • Ore Miner • Portal • Reactor |
Parts | Excavation Lathe • Kelvin Freeze Cannon • Mark 1 Cannon • Mercury Rocket Launcher • Sentinel Cannon |
Enemies | Bot • Digimaker • Emitter • Fixed Emitter • Part Emitter • Phantom Emitter • Rift Inhibitor • Spawner • Thrower |
Map Elements | AC Ore Emitter • B.O.B. • Hibernation Pod • IXE Core • Info Cache • Tech Module • T.O.M. • Upgrade Gem |