Small

From IvanWiki
Jump to navigation Jump to search

Coding: This article contains code which is for experienced users only, and may reveal game secrets

truth IsSmall() const { return SquaresUnder == 1; }

IsSmall is a truth statement not seen in char.dat that actually specifies whether a character is of regular size - as opposed to monsters that take up 4 tiles that is. IsSmall is a default state for all characters unless otherwise stated.

Small is mostly used so that the player is drawn correctly over the environment, and also the player's cursor. When IsSmall is not true for the player, the game knows to adjust the player cursor to be 4 tiles large instead.

IsSmall is also used for Necromancers and Dark Mages as a check for whether they will attack. Master necromancers will teleport away, but apprentice necromancers will not attack if their enemy is not small. The same applies for apprentice dark mages, and both will instead try to invoke spells or run away rather than attack directly.
Mystic frogs will also attempt to teleport away instead of attacking if their opponent is not small.

Amusingly, a character can be both small and enormous.