Lit Bomb: Difference between revisions

From MZXWiki
Jump to navigation Jump to search
m (→‎Unintended behavior: correct out-of-bounds behavior.)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
|idanim_chars = Lit Bomb anim<br>(#169-#175)
|idanim_chars = Lit Bomb anim<br>(#169-#175)
|active = y
|active = y
|pushable = all
|pushable = any
|explode_bombed = y
|explode_bombed = y
}}
}}
[[Category:MegaZeux]] [[Category:MegaZeux built-in objects]] [[Category:Elements]]
[[Category:MegaZeux]] [[Category:MegaZeux built-in objects]] [[Category:Elements]]


A [[Lit Bomb]] is a [[MegaZeux]] [[built-in]] [[Elements|element]]. A Lit Bomb has a fuse that shortens every cycle until the Lit Bomb finally [[Explosion|explodes]].
[[Lit Bomb]] (ID 37, <code>LitBomb</code>) is a [[MegaZeux]] [[built-in]] [[Elements|element]]. Lit Bombs have a fuse that shortens every cycle until they finally [[Explosion|explode]].


Lit Bombs are created either when the [[Player]] lays a bomb, a [[Robot]] lays a bomb, or when the Player touches a [[Bomb]] when the [[board]] setting [[Collect bombs]] is disabled. They can also be placed directly in the [[editor]].
Lit Bombs are created either when the [[Player]] lays a bomb, a [[Robot]] lays a bomb, or when the Player touches a [[Bomb]] when the [[board]] setting [[Collect bombs]] is disabled. They can also be placed directly in the [[editor]].
Line 38: Line 38:
* '''7''': the Lit Bomb will detonate as intended, but may briefly display using a character derived from ID animation index #176 (Energizer color 1).
* '''7''': the Lit Bomb will detonate as intended, but may briefly display using a character derived from ID animation index #176 (Energizer color 1).
* '''8-15''': the Lit Bomb will animate using ID animation positions #177-#184 (Energizer colors 2-8, Explosion Stage 1 color). When the internal '''Fuse length''' value starts the cycle at 14 or 15, it will detonate.
* '''8-15''': the Lit Bomb will animate using ID animation positions #177-#184 (Energizer colors 2-8, Explosion Stage 1 color). When the internal '''Fuse length''' value starts the cycle at 14 or 15, it will detonate.
== Edit Characters quirks ==
As of [[MegaZeux]] 2.93d, it is not possible to edit all of the ID animation chars of Lit Bomb from the [[Edit Characters]] dialog. The first index (#169) is provided; all following animation chars are derived sequentially using the chars following the first (modulo 256).
All of the Lit Bomb animation chars can be set during gameplay via the [[CHANGE CHAR ID]] command.


== ZZT connection ==
== ZZT connection ==
In [[ZZT]], the equivalent element to Lit Bomb is [[zzt:Bomb]].
In [[ZZT]], the equivalent element to Lit Bomb is [[zzt:Bomb]].

Latest revision as of 21:12, 14 June 2025

Lit Bomb # 37 Id37.png
Robotic name LitBomb
Default color 8
Default param p80 (select)
Strength: high
Fuse length: 7
ID char 0 (#37)
ID anim. chars Lit Bomb anim
(#169-#175)
Attributes Active
Pushable: any
Explode when bombed

Lit Bomb (ID 37, LitBomb) is a MegaZeux built-in element. Lit Bombs have a fuse that shortens every cycle until they finally explode.

Lit Bombs are created either when the Player lays a bomb, a Robot lays a bomb, or when the Player touches a Bomb when the board setting Collect bombs is disabled. They can also be placed directly in the editor.

Behavior

The Fuse length of a Lit Bomb will shorten every cycle (parameter increases by 1). Once the Fuse length reaches 0 (lower nibble of parameter is 6 at the start of the cycle), the Lit Bomb will explode, playing SFX 36 (Explosion) and leaving an Explosion of radius 2 (if Strength is low) or of radius 4 (if Strength is high).

The display character of a Lit Bomb is derived from (parameter MODULO 16) + 169, which references the Lit Bomb animations section of the ID animations (#169-#175).

Parameter

pXX → x yyy zzzz
      | ||| ++++- Fuse length: 0-6 = 7 through 1,
      | |||                    7-15 = undefined
      | +++------ Unused
      |
      +---------- Strength: 0 = low strength,
                            1 = high strength

Unintended behavior

If the internal Fuse length value is greater than or equal to 7, some unintended effects will occur:

  • 7: the Lit Bomb will detonate as intended, but may briefly display using a character derived from ID animation index #176 (Energizer color 1).
  • 8-15: the Lit Bomb will animate using ID animation positions #177-#184 (Energizer colors 2-8, Explosion Stage 1 color). When the internal Fuse length value starts the cycle at 14 or 15, it will detonate.

Edit Characters quirks

As of MegaZeux 2.93d, it is not possible to edit all of the ID animation chars of Lit Bomb from the Edit Characters dialog. The first index (#169) is provided; all following animation chars are derived sequentially using the chars following the first (modulo 256).

All of the Lit Bomb animation chars can be set during gameplay via the CHANGE CHAR ID command.

ZZT connection

In ZZT, the equivalent element to Lit Bomb is zzt:Bomb.