Bear

From Wiki of ZZT
Revision as of 19:40, 14 February 2021 by RT-55J (talk | contribs) (Created page with "{{Element |name=Bear |zzt-oop name=bear |category=creature |id={{Byte|34}} |color={{ColorSwatch|fg=brown|bg=black}} |char={{CharSwatch|153}} |stats=yes |cycle=3 |p1=sensitivit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Bear
ZZT-OOP namebear
Internal ID34 (0x22)
Character#char 153 Ö (0x99)
Default colordark brown on black (0x06)
Categorycreature
Stats
Default cycle3
P1sensitivity
(default: P1=8)
Other traits
Score when shot1
Effect on movementpushable, squishable
Destructible?yes
Uses ZZT-OOP color names?no

The bear is a type of built-in enemy that seeks after the player that is sufficiently aligned on a cardinal axis, based on its sensitivity stat. Unlike other enemies, bears' movement is entirely non-random regardless of their stats. If the bear walks into the player, then the player takes 10 damage and the bear is destroyed. If the bear walks into a breakable wall, then both the wall and the bear are destroyed.

If the bear is not vertically aligned with the player, the bear checks if the difference in vertical position between the player and the bear is less than or equal to 9 - Sensitivity where Sensitivity = P1 + 1. If so, then the bear takes a step horizontally towards the player. Otherwise, the bear checks if the difference in horizontal position is within the same range, and if so then it takes a vertical step towards the player.

The sensitivity stat works the opposite way on would expect given its name. At the lowest sensitivity setting, the bear moves towards the player if it is within 9 tiles of being aligned on an axis. At the highest sensitivity, the bear only moves if the player is directly aligned with it.

All non-standard values for P1 (from 9 to 255) appear to produce a bear that does not respond to the player's position at all (perhaps it is hibernating).

A diagram showing which direction a bear will move, given the player's position.