Energizer

From Wiki of ZZT
Revision as of 05:34, 13 February 2021 by RT-55J (talk | contribs)
Jump to navigation Jump to search
Energizer
ZZT-OOP nameenergizer
Internal ID14 (0x0E)
Character#char 127 (0x7F)
Default colordark purple on black (0x05)
Categoryitem
Stats?no
Other traits
Effect on movementsolid, collectable by the player
Destructible?no
Uses ZZT-OOP color names?no

The energizer element is a single-use invincibility item that operates similarly to the power pellet from Pac Man or the starman from Super Mario Bros. When collected, the player is "energized" for 75 ticks, and the message "Energizer - You are invincible" is displayed. Collecting another energizer while still energized will reset the energizer counter to 75 ticks.

While energized, the player is invincible against all built-in damage sources except for bomb blasts, and is able to safely destroy all enemies on contact. However, objects are still able to use #take health or #endgame to hurt the player. Also while energized, the seek direction is reversed, so that objects that go /seek or built-in enemies that seek towards the player will go away from the player instead.

ZZT-OOP provides two ways to detect if a player is energized. When the player picks up an energizer the message energize is sent to all objects on the board. Also, the internal flag energized is set for the duration of the player being energized.

Each extra player clone on a board will exhaust an extra torch tick every cycle.

Energizers are useful as a means of programmatically obtaining dark purple, e.g., by #changing another item to an energizer and back.