+ /// Change to a natural, relaxed animation state (row offset 0).
+ void SetHandsFree();
+ /// Change animation to represent a carrying thingamabob (row offset 2).
+ void SetCarrying();
+ /// Set a pushy animation state (row offset 4).
+ void SetPushing();
+
+ /// Set some basic boolean properties.
+ /// Parameter should be a combination from the Flags enum.
+ void SetFlags(int f) { flags = f; }
+ /// Check if the entity is blocking other entities from occupying its tile.
+ bool Blocking() const { return !(flags & FLAG_NONBLOCKING); }
+ /// Check if a battle should be launched when stepping onto a neighboring
+ /// tile.
+ bool Hostile() const { return partyLayout && numMonsters > 0; }
+ /// Check if this entity can be pushed around.
+ bool Pushable() const { return flags & FLAG_PUSHABLE; }
+ /// Check if the entity's orientation has any effect on the column rendered
+ /// from the animation or sprite.
+ bool CanTurn() const { return !(flags & FLAG_FIXED_ORIENTATION); }
+
+ /// Set a layout in battle for the party described by SetMonsters().
+ void SetPartyLayout(battle::PartyLayout *l) { partyLayout = l; }
+ /// Get the layout in battle for the party described by
+ /// Monsters{Begin,End}().
+ battle::PartyLayout *PartyLayout() { return partyLayout; }
+
+ /// Add monsters. This will cause the entity to be Hostile() and result in a
+ /// battle scene with given monsters when touched.
+ void SetMonsters(battle::Monster *m, int num) { monsters = m; numMonsters = num; }
+ battle::Monster *MonstersBegin() { return monsters; }
+ battle::Monster *MonstersEnd() { return monsters + numMonsters; }
+
+ /// Get an entity that should follow in this one's steps or 0 if none.