ScummVM API documentation
Ultima::Ultima1::Logic::MondainLogic Class Reference
Inheritance diagram for Ultima::Ultima1::Logic::MondainLogic:
Ultima::Ultima1::Logic::Logic

Public Member Functions

void entering () override
 
bool isPersisted () const override
 
void tick () override
 
- Public Member Functions inherited from Ultima::Ultima1::Logic::Logic
virtual void action (int action)
 
virtual void keypress (Common::KeyCode keycode)
 
virtual void entering ()
 
virtual void tick ()
 
virtual bool isPersisted () const
 

Protected Member Functions

bool move (Data::Direction dir) override
 
void updateCreatures () override
 
void endOfTurn () override
 
void damage (Data::Direction dir, int effectNum, int maxDistance, int strike, int hitChance, int tileId) override
 
bool cast () override
 
void castSpellAttack (Data::Direction dir) override
 
bool get () override
 
bool inform () override
 
bool quit () override
 
bool steal () override
 
bool transact () override
 
- Protected Member Functions inherited from Ultima::Ultima1::Logic::Logic
void writeString (const Common::String &msg)
 
void writeString (const char *format,...)
 
void resetLine ()
 
void prompt ()
 
void playFX (int num)
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
void redrawMap ()
 
void showAttackTile (int x, int y, int tileId)
 
void redrawStats ()
 
void giveTreasure (int coins, int nameLen)
 
void combat (Data::Direction direction, int effect)
 
virtual bool attack (Data::Direction dir)
 
virtual void endOfTurn ()
 
virtual void updateCreatures ()
 
virtual void castSpellAttack (Data::Direction)
 
virtual void damage (Data::Direction, int, int, int, int, int)
 
virtual bool board ()
 
virtual bool cast ()
 
virtual bool climb ()
 
virtual bool drop ()
 
virtual bool enter ()
 
virtual bool fire ()
 
virtual bool get ()
 
virtual bool hyperjump ()
 
virtual bool inform ()
 
virtual bool noise ()
 
virtual bool open ()
 
virtual bool quit ()
 
virtual bool ready ()
 
virtual bool steal ()
 
virtual bool transact ()
 
virtual bool unlock ()
 
virtual bool view ()
 
virtual bool xit ()
 
virtual bool zstats ()
 
virtual bool move (Data::Direction)
 
virtual bool pass ()
 

Additional Inherited Members

- Protected Attributes inherited from Ultima::Ultima1::Logic::Logic
int _weaponDamageScale = 8
 

Member Function Documentation

◆ move()

bool Ultima::Ultima1::Logic::MondainLogic::move ( Data::Direction  dir)
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ updateCreatures()

void Ultima::Ultima1::Logic::MondainLogic::updateCreatures ( )
overrideprotectedvirtual

Handles updating creatures/NPCs

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ endOfTurn()

void Ultima::Ultima1::Logic::MondainLogic::endOfTurn ( )
overrideprotectedvirtual

Called after an action is done. Deliberately does NOT chain to Logic::endOfTurn(): the Mondain encounter runs its own loop with no food upkeep, and dying to Mondain is final - none of the base class's resurrection ("Dead") handling applies. Runs updateMondainState, then (unless he's been defeated for good) gives Mondain his turn via updateCreatures, then checks whether the player has been killed

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ damage()

void Ultima::Ultima1::Logic::MondainLogic::damage ( Data::Direction  dir,
int  effectNum,
int  maxDistance,
int  strike,
int  hitChance,
int  tileId 
)
overrideprotectedvirtual

Resolves a wand attack - scans up to maxDistance tiles in the given direction for Mondain, then rolls to hit and applies damage. Unlike the main game's damage(), there's no city/castle branch here at all - this is the whole of the original's scanAndDamageAlongDirection

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ cast()

bool Ultima::Ultima1::Logic::MondainLogic::cast ( )
overrideprotectedvirtual

Cast a spell - only Magic Missile, Blink, Create, Destroy, and Kill have any effect here; everything else just fails

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ castSpellAttack()

void Ultima::Ultima1::Logic::MondainLogic::castSpellAttack ( Data::Direction  dir)
overrideprotectedvirtual

Called back by the Direction view once a direction's been chosen for whichever spell cast() deferred to it (_castSpell)

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ get()

bool Ultima::Ultima1::Logic::MondainLogic::get ( )
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ inform()

bool Ultima::Ultima1::Logic::MondainLogic::inform ( )
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ quit()

bool Ultima::Ultima1::Logic::MondainLogic::quit ( )
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ steal()

bool Ultima::Ultima1::Logic::MondainLogic::steal ( )
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ transact()

bool Ultima::Ultima1::Logic::MondainLogic::transact ( )
overrideprotectedvirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ entering()

void Ultima::Ultima1::Logic::MondainLogic::entering ( )
overridevirtual

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ isPersisted()

bool Ultima::Ultima1::Logic::MondainLogic::isPersisted ( ) const
inlineoverridevirtual

Returns whether this logic's map can be changed by the player, so its contents have to be kept in savegames

Reimplemented from Ultima::Ultima1::Logic::Logic.

◆ tick()

void Ultima::Ultima1::Logic::MondainLogic::tick ( )
overridevirtual

Called once per game frame - advances Mondain's hit-reaction and idle-pose animations

Reimplemented from Ultima::Ultima1::Logic::Logic.


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