ScummVM API documentation
MM::MM1::ViewsEnh::Combat Class Reference
Inheritance diagram for MM::MM1::ViewsEnh::Combat:
MM::MM1::ViewsEnh::ScrollView MM::MM1::Game::Combat MM::MM1::ViewsEnh::TextView MM::MM1::Game::MonsterTouch MM::MM1::UIElement MM::MM1::Game::SpellsMonsters MM::MM1::Game::GameLogic

Public Member Functions

virtual ~Combat ()
 
void displaySpellResult (const InfoMessage &msg) override
 
void disableAttacks ()
 
bool msgFocus (const FocusMessage &msg) override
 
bool msgUnfocus (const UnfocusMessage &msg) override
 
bool msgGame (const GameMessage &msg) override
 
void draw () override
 
void timeout () override
 
bool msgKeypress (const KeypressMessage &msg) override
 
bool msgMouseUp (const MouseUpMessage &msg) override
 
bool msgAction (const ActionMessage &msg) override
 
- Public Member Functions inherited from MM::MM1::ViewsEnh::ScrollView
 ScrollView (const Common::String &name)
 
 ScrollView (const Common::String &name, UIElement *owner)
 
void clearButtons ()
 
int addButton (Shared::Xeen::SpriteResource *sprites, const Common::Point &pos, int frame, const Common::KeyState &key, bool halfSize=false)
 
int addButton (Shared::Xeen::SpriteResource *sprites, const Common::Point &pos, int frame, KeybindingAction action, bool halfSize=false)
 
int addButton (const Common::Rect &r, const Common::KeyState &key)
 
int addButton (const Common::Rect &r, KeybindingAction action)
 
void setButtonEnabled (int buttonNum, bool enabled)
 
bool isButtonEnabled (int buttonNum) const
 
void setButtonPos (int buttonNum, const Common::Point &pos)
 
void removeButtons (int start, int end=-2)
 
void resetSelectedButton ()
 
void draw () override
 
bool msgFocus (const FocusMessage &msg) override
 
bool msgMouseDown (const MouseDownMessage &msg) override
 
bool msgMouseUp (const MouseUpMessage &msg) override
 
- Public Member Functions inherited from MM::MM1::ViewsEnh::TextView
 TextView (const Common::String &name)
 
 TextView (const Common::String &name, UIElement *owner)
 
void setReduced (bool flag)
 
- Public Member Functions inherited from MM::MM1::UIElement
 UIElement (const Common::String &name, UIElement *uiParent)
 
bool needsRedraw () const
 
void redraw ()
 
void focus ()
 
virtual void close ()
 
bool isFocused () const
 
void replaceView (UIElement *ui, bool replaceAllViews=false)
 
void replaceView (const Common::String &name, bool replaceAllViews=false)
 
void addView (UIElement *ui)
 
void addView (const Common::String &name)
 
void addView ()
 
void open ()
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
Common::String getName () const
 
virtual void setBounds (const Common::Rect &r)
 
Common::Rect getBounds () const
 
Graphics::ManagedSurface getSurface () const
 
virtual bool tick ()
 
virtual UIElementfindView (const Common::String &name)
 
bool send (const Common::String &viewName, const FocusMessage &msg)
 
bool send (const FocusMessage &msg)
 
bool send (const Common::String &viewName, const UnfocusMessage &msg)
 
bool send (const UnfocusMessage &msg)
 
bool send (const Common::String &viewName, const KeypressMessage &msg)
 
bool send (const KeypressMessage &msg)
 
bool send (const Common::String &viewName, const MouseDownMessage &msg)
 
bool send (const MouseDownMessage &msg)
 
bool send (const Common::String &viewName, const MouseUpMessage &msg)
 
bool send (const MouseUpMessage &msg)
 
bool send (const Common::String &viewName, const ActionMessage &msg)
 
bool send (const ActionMessage &msg)
 
bool send (const Common::String &viewName, const GameMessage &msg)
 
bool send (const GameMessage &msg)
 
bool send (const Common::String &viewName, const HeaderMessage &msg)
 
bool send (const HeaderMessage &msg)
 
bool send (const Common::String &viewName, const InfoMessage &msg)
 
bool send (const InfoMessage &msg)
 
bool send (const Common::String &viewName, const DrawGraphicMessage &msg)
 
bool send (const DrawGraphicMessage &msg)
 
- Public Member Functions inherited from MM::MM1::Game::Combat
void iterateMonsters1 ()
 
void iterateMonsters2 ()
 
void resetDestMonster ()
 
void turnUndead ()
 
void summonLightning ()
 
void paralyze ()
 
bool divineIntervention ()
 
void holyWord ()
 
void identifyMonster ()
 
void fireball ()
 
void lightningBolt ()
 
void makeRoom ()
 
void slow ()
 
void weaken ()
 
bool web ()
 
bool acidRain ()
 
void fingerOfDeath ()
 
void disintegration ()
 
- Public Member Functions inherited from MM::MM1::Game::MonsterTouch
bool monsterTouch (uint index, Common::String &line)
 
- Public Member Functions inherited from MM::MM1::Game::SpellsMonsters
void castMonsterSpell (const Common::String &monsterName, int spellNum)
 
const LineArraygetMonsterSpellMessage () const
 

Protected Member Functions

void setMode (Mode newMode) override
 
void combatDone () override
 
- Protected Member Functions inherited from MM::MM1::ViewsEnh::ScrollView
void frame ()
 
void fill ()
 
void writeSymbol (int symbolId)
 
int getButtonAt (const Common::Point &pos)
 
size_t getButtonCount () const
 
void drawButtons ()
 
- Protected Member Functions inherited from MM::MM1::ViewsEnh::TextView
byte setTextColor (byte col)
 
void writeChar (unsigned char c)
 
void writeChar (int x, int y, unsigned char c)
 
void writeString (const Common::String &str, TextAlign align=ALIGN_LEFT)
 
void writeString (int x, int y, const Common::String &str, TextAlign align=ALIGN_LEFT)
 
void writeNumber (int val)
 
void writeNumber (int x, int y, int val)
 
void writeLine (int lineNum, const Common::String &str, TextAlign align=ALIGN_LEFT, int xp=0)
 
size_t getStringWidth (const Common::String &str)
 
void newLine ()
 
Common::StringArray splitLines (const Common::String &str, int firstLineWidth=-1)
 
void clearSurface () override
 
void drawGraphic (int gfxNum)
 
- Protected Member Functions inherited from MM::MM1::UIElement
Common::Rect getLineBounds (int line1, int line2) const
 
void delaySeconds (uint seconds)
 
void delayFrames (uint frames)
 
bool isDelayActive () const
 
void cancelDelay ()
 
bool endDelay ()
 
virtual bool msgHeader (const HeaderMessage &e)
 
virtual bool msgInfo (const InfoMessage &e)
 
virtual bool msgDrawGraphic (const DrawGraphicMessage &e)
 
- Protected Member Functions inherited from MM::MM1::Game::Combat
 Combat ()
 
Common::String subtractDamageFromChar () override
 
void clear ()
 
void loadMonsters ()
 
void monsterIndexOf ()
 
void monsterSetPtr (int monsterNum)
 
void setupCanAttacks ()
 
void setupAttackersCount ()
 
void checkLeftWall ()
 
void checkRightWall ()
 
void setupHandicap ()
 
int getMonsterIndex () const override
 
bool canMonsterCast () const override
 
void dispelParty () override
 
void removeMonster () override
 
void combatLoop (bool checkMonstersFirst=false)
 
void selectTreasure ()
 
void selectTreasure2 (int index)
 
void nextRound ()
 
void nextRound2 ()
 
void nextRound3 ()
 
void updateHighestLevel ()
 
void monsterAction ()
 
bool checkMonsterSpells ()
 
void checkMonsterActions ()
 
void defeatedMonsters ()
 
void setTreasure ()
 
void clearArrays ()
 
bool moveMonsters ()
 
void monsterAdvances ()
 
bool monsterChanges ()
 
void proc2 ()
 
void checkParty ()
 
void fightMonster (int monsterNum)
 
void shootMonster (int monsterNum)
 
void attackMonsterPhysical ()
 
void attackMonsterShooting ()
 
void attackMonster (int monsterNum)
 
void addAttackDamage ()
 
void updateMonsterStatus ()
 
bool monsterTouch (Common::String &line)
 
void monsterAttackRandom ()
 
void monsterAttackInner ()
 
void monsterAttackShooting ()
 
void selectMonsterTarget ()
 
void attack ()
 
void block ()
 
void cast ()
 
void exchangeWith (int charNum)
 
void use ()
 
void retreat ()
 
void removeDeadMonsters ()
 
- Protected Member Functions inherited from MM::MM1::Game::SpellsMonsters
void handlePartyDamage ()
 
void setCondition (byte newCondition)
 
bool isCharAffected () const
 
bool damageType1 ()
 
bool damageType2 ()
 
bool damageType3 ()
 
bool damageType4 ()
 
bool damageType5 ()
 
bool damageType6 ()
 
bool damageType7 ()
 
void proc9 ()
 
void add (const Common::String &msg)
 
void add (char c)
 
void addCharName ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MM::MM1::Game::GameLogic
static int getRandomNumber (int minNumber, int maxNumber)
 
static int getRandomNumber (int maxNumber)
 
- Protected Types inherited from MM::MM1::Game::Combat
enum  Handicap { HANDICAP_EVEN = 0, HANDICAP_PARTY = 1, HANDICAP_MONSTER = 2 }
 
enum  Mode {
  SELECT_OPTION, FIGHT_WHICH, DEFEATED_MONSTERS, NEXT_ROUND,
  MONSTER_ADVANCES, MONSTERS_AFFECTED, MONSTER_FLEES, MONSTER_WANDERS,
  MONSTER_SPELL, CHAR_ATTACKS, MONSTER_ATTACK, INFILTRATION,
  WAITS_FOR_OPENING, SPELL_RESULT, NO_EFFECT
}
 
- Protected Attributes inherited from MM::MM1::ViewsEnh::ScrollView
Common::Point _symbolPos
 
- Protected Attributes inherited from MM::MM1::ViewsEnh::TextView
Common::Point _textPos
 
int _colorsNum = 0
 
bool _fontReduced = false
 
- Protected Attributes inherited from MM::MM1::UIElement
UIElement_parent
 
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 
- Protected Attributes inherited from MM::MM1::Game::Combat
Common::Array< Line_message
 
int _monstersCount = 0
 
Monster_monsterP
 
bool _treasureFlags [MAX_PARTY_SIZE]
 
int _val1
 
int _roundNum
 
int _monsterIndex
 
int _currentChar
 
bool _allowFight
 
bool _allowShoot
 
bool _allowCast
 
bool _allowAttack
 
byte _val6
 
byte _val7
 
int _partyIndex
 
int _val9
 
int _monsterShootingCtr
 
int _activeMonsterNum
 
int _destCharCtr
 
int _destAC
 
int _numberOfTimes
 
int _attackerLevel
 
int _advanceIndex
 
int _handicapThreshold
 
int _handicapParty
 
int _handicapMonsters
 
int _handicapDelta
 
int _attackersCount
 
int _totalExperience
 
Common::String _monsterName
 
bool _monstersResistSpells
 
bool _monstersRegenerate
 
AttributePair _attackAttr1
 
AttributePair _attackAttr2
 
int _timesHit
 
bool _isShooting
 
Common::String _attackMessage
 
Handicap _handicap = HANDICAP_EVEN
 
Mode _mode = SELECT_OPTION
 
int _destMonsterNum = 0
 
int _monstersDestroyedCtr = 0
 
bool _turnUndeadUsed = false
 
bool _divineInterventionUsed = false
 
size_t _spellMonsterCount = 0
 
int _monsterAttackStyle = -1
 
- Protected Attributes inherited from MM::MM1::Game::SpellsMonsters
Common::Array< Monster * > _remainingMonsters
 
LineArray _lines
 
int _damage = 0
 
int _displayedDamage = 0
 

Constructor & Destructor Documentation

◆ ~Combat()

virtual MM::MM1::ViewsEnh::Combat::~Combat ( )
inlinevirtual

Destructor

Reimplemented from MM::MM1::Game::Combat.

Member Function Documentation

◆ setMode()

void MM::MM1::ViewsEnh::Combat::setMode ( Mode  newMode)
overrideprotectedvirtual

Sets a new display mode

Implements MM::MM1::Game::Combat.

◆ combatDone()

void MM::MM1::ViewsEnh::Combat::combatDone ( )
overrideprotectedvirtual

Does final cleanup when combat is done

Reimplemented from MM::MM1::Game::Combat.

◆ displaySpellResult()

void MM::MM1::ViewsEnh::Combat::displaySpellResult ( const InfoMessage msg)
overridevirtual

Display a combat spell's result

Implements MM::MM1::Game::Combat.

◆ disableAttacks()

void MM::MM1::ViewsEnh::Combat::disableAttacks ( )

Disable the flags for allowing attacks for the current character

◆ msgFocus()

bool MM::MM1::ViewsEnh::Combat::msgFocus ( const FocusMessage msg)
overridevirtual

Called when the view is focused

Reimplemented from MM::MM1::UIElement.

◆ msgUnfocus()

bool MM::MM1::ViewsEnh::Combat::msgUnfocus ( const UnfocusMessage msg)
overridevirtual

Called when the view is unfocused

Reimplemented from MM::MM1::UIElement.

◆ msgGame()

bool MM::MM1::ViewsEnh::Combat::msgGame ( const GameMessage msg)
overridevirtual

Called for game messages

Reimplemented from MM::MM1::UIElement.

◆ draw()

void MM::MM1::ViewsEnh::Combat::draw ( )
overridevirtual

Draw the Combat details overlayed on the existing game screen

Reimplemented from MM::MM1::UIElement.

◆ timeout()

void MM::MM1::ViewsEnh::Combat::timeout ( )
overridevirtual

Handles delay timeouts

Reimplemented from MM::MM1::UIElement.

◆ msgKeypress()

bool MM::MM1::ViewsEnh::Combat::msgKeypress ( const KeypressMessage msg)
overridevirtual

Handles keypresses

Reimplemented from MM::MM1::UIElement.

◆ msgMouseUp()

bool MM::MM1::ViewsEnh::Combat::msgMouseUp ( const MouseUpMessage msg)
overridevirtual

Handle mouse up messages

Reimplemented from MM::MM1::UIElement.

◆ msgAction()

bool MM::MM1::ViewsEnh::Combat::msgAction ( const ActionMessage msg)
overridevirtual

Key binder actions

Reimplemented from MM::MM1::UIElement.


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