Energizer: Difference between revisions
(Created page with "{{Element |zzt-oop name=energizer |id={{Byte|14}} |char={{CharSwatch|127}} |color={{ColorSwatch|fg=dark purple|bg=black}} |category=item |stats=no |destructible=no |effect on...") |
m (energized player vulnerable to bomb blasts) |
||
Line 12: | Line 12: | ||
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. | 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|#take health]] or [[ | While energized, the player is invincible against all built-in damage sources except for [[bomb|bomb blasts]], and is able to safely destroy all enemies on contact. However, objects are still able to use [[take|#take health]] or [[endgame|#endgame]] to hurt the player. Also while energized, the [[seek]] direction is reversed, so that objects that go <code>/seek</code> 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. | [[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. |
Revision as of 12:53, 9 February 2021
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 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.
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 |