ScummVM API documentation
Ultima::Ultima1::Spells::Spell Class Reference

#include <spell.h>

Inheritance diagram for Ultima::Ultima1::Spells::Spell:
Ultima::Shared::Spell Ultima::Shared::Itemized Ultima::Shared::NamedItem Ultima::Shared::TreeItem Ultima::Shared::MessageTarget Ultima::Shared::BaseObject Ultima::Ultima1::Spells::Blink Ultima::Ultima1::Spells::Create Ultima::Ultima1::Spells::Destroy Ultima::Ultima1::Spells::KillMagicMIssile Ultima::Ultima1::Spells::LadderDown Ultima::Ultima1::Spells::LadderUp Ultima::Ultima1::Spells::OpenUnlock Ultima::Ultima1::Spells::Prayer Ultima::Ultima1::Spells::Steal

Public Member Functions

void changeQuantity (int delta) override
 
virtual void cast (Maps::MapBase *map)
 
virtual void dungeonCast (Maps::MapDungeon *map)
 
uint getBuyCost () const
 
- Public Member Functions inherited from Ultima::Shared::Itemized
 Itemized ()
 
virtual ~Itemized ()
 
void synchronize (Common::Serializer &s)
 
void incrQuantity ()
 
bool empty () const
 
bool decrQuantity ()
 
- Public Member Functions inherited from Ultima::Shared::NamedItem
 NamedItem (const Common::String &name)
 
const Common::String getName () const override
 
- Public Member Functions inherited from Ultima::Shared::TreeItem
virtual bool isEquals (const Common::String &name, int maxLen=0) const
 
virtual int compareTo (const Common::String &name, int maxLen=0) const
 
virtual void viewChange ()
 
TreeItemgetParent () const
 
GamegetGame ()
 
const GamegetGame () const
 
Gfx::VisualItemgetView ()
 
TreeItemgetNextSibling () const
 
TreeItemgetPriorSibling () const
 
TreeItemgetLastSibling ()
 
TreeItemgetFirstChild () const
 
TreeItemgetLastChild () const
 
TreeItemscan (TreeItem *item) const
 
TreeItemfindChildInstanceOf (const ClassDef &classDef) const
 
TreeItemfindNextInstanceOf (const ClassDef &classDef, TreeItem *startItem) const
 
void addUnder (TreeItem *newParent)
 
void addChild (TreeItem *child)
 
void setParent (TreeItem *newParent)
 
void addSibling (TreeItem *item)
 
void moveUnder (TreeItem *newParent)
 
void destroyAll ()
 
int destroyChildren ()
 
void detach ()
 
void attach (TreeItem *item)
 
NamedItemfindByName (const Common::String &name)
 
- Public Member Functions inherited from Ultima::Shared::BaseObject
virtual ::Ultima::Shared::ClassDef getType () const
 
bool isInstanceOf (const ClassDef &classDef) const
 

Protected Member Functions

void addInfoMsg (const Common::String &text, bool newLine=true, bool replaceLine=false)
 
 Spell (Ultima1Game *game, Character *c, SpellId spellId)
 
- Protected Member Functions inherited from Ultima::Shared::MessageTarget
virtual const Ultima::Shared::MSGMAPgetMessageMap () const
 

Protected Attributes

Ultima1Game_game
 
Character_character
 
SpellId _spellId
 

Additional Inherited Members

- Static Public Member Functions inherited from Ultima::Shared::BaseObject
::Ultima::Shared::ClassDef type ()
 
- Public Attributes inherited from Ultima::Shared::Itemized
uint _quantity
 
- Public Attributes inherited from Ultima::Shared::NamedItem
Common::String _name
 
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::TreeItem
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::MessageTarget
 CLASSDEF
 
- Static Protected Member Functions inherited from Ultima::Shared::MessageTarget
static const Ultima::Shared::MSGMAPgetThisMessageMap ()
 

Detailed Description

Base class for Ultima 1 spells

Constructor & Destructor Documentation

◆ Spell()

Ultima::Ultima1::Spells::Spell::Spell ( Ultima1Game game,
Character c,
SpellId  spellId 
)
protected

Constructor

Member Function Documentation

◆ addInfoMsg()

void Ultima::Ultima1::Spells::Spell::addInfoMsg ( const Common::String text,
bool  newLine = true,
bool  replaceLine = false 
)
protected

Adds a text string to the info area

Parameters
textText to add
newLineWhether to apply a newline at the end

◆ changeQuantity()

void Ultima::Ultima1::Spells::Spell::changeQuantity ( int  delta)
inlineoverridevirtual

Change the quantity by a given amount

Reimplemented from Ultima::Shared::Itemized.

◆ cast()

virtual void Ultima::Ultima1::Spells::Spell::cast ( Maps::MapBase map)
virtual

Cast the spell outside of dungeons

Reimplemented in Ultima::Ultima1::Spells::KillMagicMIssile, and Ultima::Ultima1::Spells::Prayer.

◆ dungeonCast()

◆ getBuyCost()

uint Ultima::Ultima1::Spells::Spell::getBuyCost ( ) const

Gets how much the weapon can be bought for


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