ScummVM API documentation
MM::MM1::Game::Combat Class Referenceabstract
Inheritance diagram for MM::MM1::Game::Combat:
MM::MM1::Game::MonsterTouch MM::MM1::Game::SpellsMonsters MM::MM1::Game::GameLogic MM::MM1::Views::Combat MM::MM1::ViewsEnh::Combat

Public Member Functions

virtual void displaySpellResult (const InfoMessage &msg)=0
 
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 Types

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 Member Functions

 Combat ()
 
virtual ~Combat ()
 
virtual void setMode (Mode newMode)=0
 
virtual void combatDone ()
 
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 ()
 

Protected Attributes

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
 

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)
 

Constructor & Destructor Documentation

◆ Combat()

MM::MM1::Game::Combat::Combat ( )
protected

Constructor

◆ ~Combat()

virtual MM::MM1::Game::Combat::~Combat ( )
protectedvirtual

Destructor

Reimplemented in MM::MM1::ViewsEnh::Combat, and MM::MM1::Views::Combat.

Member Function Documentation

◆ setMode()

virtual void MM::MM1::Game::Combat::setMode ( Mode  newMode)
protectedpure virtual

Sets the combat display mode

Implemented in MM::MM1::ViewsEnh::Combat, and MM::MM1::Views::Combat.

◆ combatDone()

virtual void MM::MM1::Game::Combat::combatDone ( )
protectedvirtual

Does final cleanup when combat is done

Reimplemented in MM::MM1::ViewsEnh::Combat, and MM::MM1::Views::Combat.

◆ subtractDamageFromChar()

Common::String MM::MM1::Game::Combat::subtractDamageFromChar ( )
overrideprotectedvirtual

Subtracts the damage from the character, making them unconscious or die if needed

Implements MM::MM1::Game::SpellsMonsters.

◆ clear()

void MM::MM1::Game::Combat::clear ( )
protected

Clear all the combat variables

◆ monsterIndexOf()

void MM::MM1::Game::Combat::monsterIndexOf ( )
protected

Sets the _monsterIndex to the index of _monsterP in the monster list

◆ monsterSetPtr()

void MM::MM1::Game::Combat::monsterSetPtr ( int  monsterNum)
protected

Sets _monsterP to point to a specified monster

◆ setupCanAttacks()

void MM::MM1::Game::Combat::setupCanAttacks ( )
protected

Sets up the flags for whether each character in the party can attack from their position.

◆ setupAttackersCount()

void MM::MM1::Game::Combat::setupAttackersCount ( )
protected

Chooses the starting character to

◆ checkLeftWall()

void MM::MM1::Game::Combat::checkLeftWall ( )
protected

Checks whether the third party member is blocked by a left wall

◆ checkRightWall()

void MM::MM1::Game::Combat::checkRightWall ( )
protected

Checks whether the fourth party member is blocked by a right wall

◆ setupHandicap()

void MM::MM1::Game::Combat::setupHandicap ( )
protected

Sets up the handicap for the encounter

◆ getMonsterIndex()

int MM::MM1::Game::Combat::getMonsterIndex ( ) const
inlineoverrideprotectedvirtual

Get the monster index

Implements MM::MM1::Game::SpellsMonsters.

◆ canMonsterCast()

bool MM::MM1::Game::Combat::canMonsterCast ( ) const
overrideprotectedvirtual

Returns true if a monster can cast certain spells

Implements MM::MM1::Game::SpellsMonsters.

◆ dispelParty()

void MM::MM1::Game::Combat::dispelParty ( )
overrideprotectedvirtual

Dispels any effects on the party

Implements MM::MM1::Game::SpellsMonsters.

◆ combatLoop()

void MM::MM1::Game::Combat::combatLoop ( bool  checkMonstersFirst = false)
protected

Main combat loop that selects the next party member or monster to take their turn

◆ selectTreasure()

void MM::MM1::Game::Combat::selectTreasure ( )
protected

Select treasure for a defeated monster

◆ nextRound()

void MM::MM1::Game::Combat::nextRound ( )
protected

Moves to the next round

◆ updateHighestLevel()

void MM::MM1::Game::Combat::updateHighestLevel ( )
protected

Update the _highestLevel to the remaining active members of the party

◆ monsterAction()

void MM::MM1::Game::Combat::monsterAction ( )
protected

Calculate a monster action

◆ checkMonsterSpells()

bool MM::MM1::Game::Combat::checkMonsterSpells ( )
protected

Check if monster is mindless and wandering

◆ checkMonsterActions()

void MM::MM1::Game::Combat::checkMonsterActions ( )
protected

Check other monster actions

◆ fightMonster()

void MM::MM1::Game::Combat::fightMonster ( int  monsterNum)
protected

Attack a monster

◆ addAttackDamage()

void MM::MM1::Game::Combat::addAttackDamage ( )
protected

Adds attack damage message for character hitting monster

◆ updateMonsterStatus()

void MM::MM1::Game::Combat::updateMonsterStatus ( )
protected

Updates a monster's status

◆ monsterTouch()

bool MM::MM1::Game::Combat::monsterTouch ( Common::String line)
protected

Handles a monster touch action, if any

◆ monsterAttackRandom()

void MM::MM1::Game::Combat::monsterAttackRandom ( )
protected

Handles monster atttack logic

◆ monsterAttackShooting()

void MM::MM1::Game::Combat::monsterAttackShooting ( )
protected

Handles monster shooting a character

◆ selectMonsterTarget()

void MM::MM1::Game::Combat::selectMonsterTarget ( )
protected

Selects monster to attack

◆ attack()

void MM::MM1::Game::Combat::attack ( )
protected

Attack option

◆ block()

void MM::MM1::Game::Combat::block ( )
protected

Block option

◆ cast()

void MM::MM1::Game::Combat::cast ( )
protected

Cast option

◆ exchangeWith()

void MM::MM1::Game::Combat::exchangeWith ( int  charNum)
protected

Exchange current character with another

◆ use()

void MM::MM1::Game::Combat::use ( )
protected

Use option

◆ retreat()

void MM::MM1::Game::Combat::retreat ( )
protected

Retreat option

◆ removeDeadMonsters()

void MM::MM1::Game::Combat::removeDeadMonsters ( )
protected

Called to remove any dead monsters

◆ displaySpellResult()

virtual void MM::MM1::Game::Combat::displaySpellResult ( const InfoMessage msg)
pure virtual

Display a combat spell's result

Implemented in MM::MM1::ViewsEnh::Combat, and MM::MM1::Views::Combat.


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