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

#include <combat_logic.h>

Inheritance diagram for Ultima::Ultima3::CombatLogic:
Ultima::Ultima3::Logic

Public Member Functions

void begin (int creature)
 
void beginDungeon (byte monsterClass)
 
void syncShown ()
 
byte shownTile (int x, int y) const
 
Common::Array< CombatEvent > & events ()
 
bool allMonstersDead () const
 
void killAllMonsters ()
 
int negateTurns () const
 
void decrementHold ()
 
void endHold ()
 
bool movePlayer (int slot, int dx, int dy)
 
void playerAttack (int slot, Direction dir)
 
void monstersTurn ()
 
void castProjectile (int slot, int damage, Direction dir)
 
void castGroupDamage (int slot, int damage)
 
void castDrain ()
 
bool castSlay (int slot, byte monsterClass)
 
- Public Member Functions inherited from Ultima::Ultima3::Logic
void incrementMoveCounter (int amount=-1)
 
void processPartyTurnEffects (bool everyTurn)
 
bool damageCharacter (int slot, int amount)
 

Public Attributes

Data::Arena _arena
 
byte _monsterClass = 0
 
byte _savedLocation = 0
 
int _combatant = 0
 

Detailed Description

A fight between the party and a group of monsters on a small arena

Member Function Documentation

◆ begin()

void Ultima::Ultima3::CombatLogic::begin ( int  creature)

Starts a fight with one of the creatures on the current map

◆ beginDungeon()

void Ultima::Ultima3::CombatLogic::beginDungeon ( byte  monsterClass)

Starts a fight with monsters met in a dungeon

Parameters
monsterClassThe tile number of the monsters

◆ syncShown()

void Ultima::Ultima3::CombatLogic::syncShown ( )

Brings what's shown up to date with the fight

◆ shownTile()

byte Ultima::Ultima3::CombatLogic::shownTile ( int  x,
int  y 
) const
inline

Returns the tile to show at a place in the arena

◆ events()

Common::Array< CombatEvent > & Ultima::Ultima3::CombatLogic::events ( )
inline

Returns the events waiting to be played back

◆ killAllMonsters()

void Ultima::Ultima3::CombatLogic::killAllMonsters ( )

Removes every monster from the fight

◆ negateTurns()

int Ultima::Ultima3::CombatLogic::negateTurns ( ) const

Returns how many turns of time being held still are left

◆ movePlayer()

bool Ultima::Ultima3::CombatLogic::movePlayer ( int  slot,
int  dx,
int  dy 
)

Lets a party member step in a direction

Returns
False if something is in the way

◆ playerAttack()

void Ultima::Ultima3::CombatLogic::playerAttack ( int  slot,
Direction  dir 
)

Has a party member attack in a direction with the weapon they're using

◆ monstersTurn()

void Ultima::Ultima3::CombatLogic::monstersTurn ( )

Lets every monster take its turn

◆ castProjectile()

void Ultima::Ultima3::CombatLogic::castProjectile ( int  slot,
int  damage,
Direction  dir 
)

Casts a spell that flies in a direction from a party member, harming the first monster it reaches

◆ castGroupDamage()

void Ultima::Ultima3::CombatLogic::castGroupDamage ( int  slot,
int  damage 
)

Casts a spell that can harm any of the monsters

◆ castDrain()

void Ultima::Ultima3::CombatLogic::castDrain ( )

Casts a spell that leaves every monster with little life

◆ castSlay()

bool Ultima::Ultima3::CombatLogic::castSlay ( int  slot,
byte  monsterClass 
)

Casts a spell that only works once a fight, against one kind of monster

Returns
False if it fails

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