ScummVM API documentation
Ultima::Ultima4::Party Class Reference
Inheritance diagram for Ultima::Ultima4::Party:
Ultima::Ultima4::Observable< Party *, PartyEvent &> Ultima::Ultima4::Script::Provider

Public Member Functions

 Party (SaveGame *saveGame)
 
void notifyOfChange (PartyMember *partyMember=0, PartyEvent::Type=PartyEvent::GENERIC)
 
Common::String translate (Std::vector< Common::String > &parts) override
 
void adjustFood (int food)
 
void adjustGold (int gold)
 
void adjustKarma (KarmaAction action)
 
void applyEffect (TileEffect effect)
 
bool attemptElevation (Virtue virtue)
 
void burnTorch (int turns=1)
 
bool canEnterShrine (Virtue virtue)
 
bool canPersonJoin (Common::String name, Virtue *v)
 
void damageShip (uint pts)
 
bool donate (int quantity)
 
void endTurn ()
 
int getChest ()
 
int getTorchDuration () const
 
void healShip (uint pts)
 
bool isFlying () const
 
bool isImmobilized ()
 
bool isDead ()
 
bool isPersonJoined (Common::String name)
 
CannotJoinError join (Common::String name)
 
bool lightTorch (int duration=100, bool loseTorch=true)
 
void quenchTorch ()
 
void reviveParty ()
 
MapTile getTransport () const
 
void setTransport (MapTile transport)
 
void setShipHull (int str)
 
Direction getDirection () const
 
void setDirection (Direction dir)
 
void adjustReagent (int reagent, int amt)
 
int getReagent (int reagent) const
 
short * getReagentPtr (int reagent) const
 
void setActivePlayer (int p)
 
int getActivePlayer () const
 
void swapPlayers (int p1, int p2)
 
int size () const
 
PartyMembermember (int index) const
 
- Public Member Functions inherited from Ultima::Ultima4::Observable< Party *, PartyEvent &>
void addObserver (Observer< Party *, PartyEvent & > *o)
 
int countObservers () const
 
void deleteObserver (Observer< Party *, PartyEvent & > *o)
 
void deleteObservers ()
 
bool hasChanged () const
 
void notifyObservers (PartyEvent & arg)
 

Additional Inherited Members

- Protected Member Functions inherited from Ultima::Ultima4::Observable< Party *, PartyEvent &>
void clearChanged ()
 
void setChanged ()
 

Member Function Documentation

◆ notifyOfChange()

void Ultima::Ultima4::Party::notifyOfChange ( PartyMember partyMember = 0,
PartyEvent::Type  = PartyEvent::GENERIC 
)

Notify the party that something about it has changed

◆ adjustKarma()

void Ultima::Ultima4::Party::adjustKarma ( KarmaAction  action)

Adjusts the avatar's karma level for the given action. Notify observers with a lost eighth event if the player has lost avatarhood.

◆ applyEffect()

void Ultima::Ultima4::Party::applyEffect ( TileEffect  effect)

Apply effects to the entire party

◆ attemptElevation()

bool Ultima::Ultima4::Party::attemptElevation ( Virtue  virtue)

Attempt to elevate in the given virtue

◆ burnTorch()

void Ultima::Ultima4::Party::burnTorch ( int  turns = 1)

Burns a torch's duration down a certain number of turns

◆ canEnterShrine()

bool Ultima::Ultima4::Party::canEnterShrine ( Virtue  virtue)

Returns true if the party can enter the shrine

◆ canPersonJoin()

bool Ultima::Ultima4::Party::canPersonJoin ( Common::String  name,
Virtue *  v 
)

Returns true if the person can join the party

◆ damageShip()

void Ultima::Ultima4::Party::damageShip ( uint  pts)

Damages the party's ship

◆ donate()

bool Ultima::Ultima4::Party::donate ( int  quantity)

Donates 'quantity' gold. Returns true if the donation succeeded, or false if there was not enough gold to make the donation

◆ endTurn()

void Ultima::Ultima4::Party::endTurn ( )

Ends the party's turn

◆ getChest()

int Ultima::Ultima4::Party::getChest ( )

Adds a chest worth of gold to the party's inventory

◆ getTorchDuration()

int Ultima::Ultima4::Party::getTorchDuration ( ) const

Returns the number of turns a currently lit torch will last (or 0 if no torch lit)

◆ healShip()

void Ultima::Ultima4::Party::healShip ( uint  pts)

Heals the ship's hull strength by 'pts' points

◆ isFlying()

bool Ultima::Ultima4::Party::isFlying ( ) const

Returns true if the balloon is currently in the air

◆ isImmobilized()

bool Ultima::Ultima4::Party::isImmobilized ( )

Whether or not the party can make an action.

◆ isDead()

bool Ultima::Ultima4::Party::isDead ( )

Whether or not all the party members are dead.

◆ isPersonJoined()

bool Ultima::Ultima4::Party::isPersonJoined ( Common::String  name)

Returns true if the person with that name is already in the party

◆ join()

CannotJoinError Ultima::Ultima4::Party::join ( Common::String  name)

Attempts to add the person to the party. Returns JOIN_SUCCEEDED if successful.

◆ lightTorch()

bool Ultima::Ultima4::Party::lightTorch ( int  duration = 100,
bool  loseTorch = true 
)

Lights a torch with a default duration of 100

◆ quenchTorch()

void Ultima::Ultima4::Party::quenchTorch ( )

Extinguishes a torch

◆ reviveParty()

void Ultima::Ultima4::Party::reviveParty ( )

Revives the party after the entire party has been killed

◆ size()

int Ultima::Ultima4::Party::size ( ) const

Returns the size of the party

◆ member()

PartyMember* Ultima::Ultima4::Party::member ( int  index) const

Returns a pointer to the party member indicated


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