Ruffian

From Wiki of ZZT
Jump to navigation Jump to search
Ruffian
ZZT-OOP nameruffian
Internal ID35 (0x23)
Character#char 5 (0x05)
Default colorpurple on black (0x0D)
Categorycreature
Stats
X/Y-stepYes
Default cycle1
P1Intelligence
P2Resting Time
Other traits
Score when shot2
Effect on movementpushable
Destructible?yes
Uses ZZT-OOP color names?no

Ruffians are a type of built-in enemy known for their fast, erratic movement.

Ruffians have two states: resting and moving. While resting, the chance they choose to begin moving on a given tick is (Resting Time+7)/17. If they choose to move, they then randomly choose whether to move towards the player or in a random direction depending on their intelligence stat.

In their moving state, if they are aligned with the player they have a random chance of seeking towards the player (depending on their intelligence). Otherwise, they keep moving in a straight line until they leave their moving state. The chance that a moving ruffian returns to its resting state on a given tick is (Resting Time+7)/17. Hitting a wall also puts them back into their resting state.