Energizer
Energizer | |
---|---|
ZZT-OOP name | energizer |
Internal ID | 14 (0x0E) |
Character | #char 127 ⌂ (0x7F) |
Default color | dark purple on black (0x05) |
Category | item |
Stats? | no |
Other traits | |
Effect on movement | solid, 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. 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, and 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.
Energizers are useful as a means of programmatically obtaining dark purple, e.g., by #changing another item to an energizer and back.
Elements | |
---|---|
Special | |
Items | |
Terrain | |
Creatures | |
Text |