ScummVM API documentation
Ultima::Ultima3::DungeonLogic Class Reference

#include <dungeon_logic.h>

Inheritance diagram for Ultima::Ultima3::DungeonLogic:
Ultima::Ultima3::Logic

Public Types

enum  Ladder { LADDER_NONE , LADDER_TAKEN , LADDER_OUT }
 

Public Member Functions

byte tile () const
 
bool moveForward ()
 
bool moveBackward ()
 
bool turn (bool right)
 
Ladder climb ()
 
bool descend ()
 
int rollEncounter ()
 
void teleportRandomly ()
 
- Public Member Functions inherited from Ultima::Ultima3::Logic
void incrementMoveCounter (int amount=-1)
 
void processPartyTurnEffects (bool everyTurn)
 
bool damageCharacter (int slot, int amount)
 

Detailed Description

Rules for moving the party around a dungeon

Member Function Documentation

◆ tile()

byte Ultima::Ultima3::DungeonLogic::tile ( ) const

Returns the square the party is on

◆ moveForward()

bool Ultima::Ultima3::DungeonLogic::moveForward ( )

Moves the party a step forward or backward, if they can

Returns
True if they moved

◆ turn()

bool Ultima::Ultima3::DungeonLogic::turn ( bool  right)

Turns the party a quarter turn, if they can

Returns
True if they turned

◆ climb()

Ladder Ultima::Ultima3::DungeonLogic::climb ( )

Climbs up a ladder. If this was from the first level it takes the party out of the dungeon

◆ descend()

bool Ultima::Ultima3::DungeonLogic::descend ( )

Goes down a ladder, if there's one

Returns
True if they did

◆ rollEncounter()

int Ultima::Ultima3::DungeonLogic::rollEncounter ( )

Sometimes monsters are met on an empty square

Returns
The tile number of the monsters, or -1

◆ teleportRandomly()

void Ultima::Ultima3::DungeonLogic::teleportRandomly ( )

Moves the party to a random empty square on the level


The documentation for this class was generated from the following file: