ScummVM API documentation
Ultima::Ultima4::Spells Class Reference

Public Member Functions

 Spells ()
 
 ~Spells ()
 
void spellSetEffectCallback (SpellEffectCallback callback)
 
void spellEffect (int spell, int player, Sound sound)
 
int spellMix (uint spell, const Ingredients *ingredients)
 
bool spellCast (uint spell, int character, int param, SpellCastError *error, bool spellEffect)
 
Common::String spellGetErrorMessage (uint spell, SpellCastError error)
 
const char * spellGetName (uint spell) const
 
SpellCastError spellCheckPrerequisites (uint spell, int character)
 
Spell::Param spellGetParamType (uint spell) const
 
int spellGetRequiredMP (uint spell) const
 
const SpellgetSpell (int i) const
 

Constructor & Destructor Documentation

◆ Spells()

Ultima::Ultima4::Spells::Spells ( )

Constructor

◆ ~Spells()

Ultima::Ultima4::Spells::~Spells ( )

Destructor

Member Function Documentation

◆ spellMix()

int Ultima::Ultima4::Spells::spellMix ( uint  spell,
const Ingredients ingredients 
)

Mix reagents for a spell. Fails and returns false if the reagents selected were not correct.

◆ spellCast()

bool Ultima::Ultima4::Spells::spellCast ( uint  spell,
int  character,
int  param,
SpellCastError *  error,
bool  spellEffect 
)

Casts spell. Fails and returns false if the spell cannot be cast. The error code is updated with the reason for failure.

◆ spellCheckPrerequisites()

SpellCastError Ultima::Ultima4::Spells::spellCheckPrerequisites ( uint  spell,
int  character 
)

Checks some basic prerequistes for casting a spell. Returns an error if no mixture is available, the context is invalid, or the character doesn't have enough magic points.


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