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 | msgAction (const ActionMessage &msg) override |
![]() | |
TextView (const Common::String &name) | |
TextView (const Common::String &name, UIElement *owner) | |
bool | msgDrawGraphic (const DrawGraphicMessage &msg) override |
![]() | |
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 UIElement * | findView (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) |
![]() | |
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 () |
![]() | |
bool | monsterTouch (uint index, Common::String &line) |
![]() | |
void | castMonsterSpell (const Common::String &monsterName, int spellNum) |
const LineArray & | getMonsterSpellMessage () const |
Protected Member Functions | |
void | setMode (Mode newMode) override |
void | combatDone () override |
![]() | |
void | setTextColor (byte col) |
void | writeChar (unsigned char c) |
void | writeChar (int x, int y, unsigned char c) |
void | writeString (const Common::String &str) |
void | writeString (int x, int y, const Common::String &str) |
void | writeNumber (int val) |
void | writeNumber (int x, int y, int val) |
void | newLine () |
void | writeSpaces (size_t count) |
void | clearSurface () override |
void | clearLines (int y1, int y2) |
void | drawTextBorder () |
void | escToGoBack (int x=12, int y=-1) |
void | drawGraphic (int gfxNum) |
![]() | |
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 | msgMouseDown (const MouseDownMessage &e) |
virtual bool | msgMouseUp (const MouseUpMessage &e) |
virtual bool | msgHeader (const HeaderMessage &e) |
virtual bool | msgInfo (const InfoMessage &e) |
![]() | |
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 () |
![]() | |
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 int | getRandomNumber (int minNumber, int maxNumber) |
static int | getRandomNumber (int maxNumber) |
![]() | |
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 } |
![]() | |
Common::Point | _textPos |
byte | _bgColor = 0xff |
![]() | |
UIElement * | _parent |
Common::Array< UIElement * > | _children |
Common::Rect | _innerBounds |
Bounds | _bounds |
bool | _needsRedraw = true |
Common::String | _name |
![]() | |
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 |
![]() | |
Common::Array< Monster * > | _remainingMonsters |
LineArray | _lines |
int | _damage = 0 |
int | _displayedDamage = 0 |
|
inlinevirtual |
Destructor
Reimplemented from MM::MM1::Game::Combat.
|
overrideprotectedvirtual |
Sets a new display mode
Implements MM::MM1::Game::Combat.
|
overrideprotectedvirtual |
Does final cleanup when combat is done
Reimplemented from MM::MM1::Game::Combat.
|
overridevirtual |
Display a combat spell's result
Implements MM::MM1::Game::Combat.
void MM::MM1::Views::Combat::disableAttacks | ( | ) |
Disable the flags for allowing attacks for the current character
|
overridevirtual |
Called when the view is focused
Reimplemented from MM::MM1::UIElement.
|
overridevirtual |
Called when the view is unfocused
Reimplemented from MM::MM1::UIElement.
|
overridevirtual |
Called for game messages
Reimplemented from MM::MM1::UIElement.
|
overridevirtual |
Draw the Combat details overlayed on the existing game screen
Reimplemented from MM::MM1::UIElement.
|
overridevirtual |
Handles delay timeouts
Reimplemented from MM::MM1::Views::TextView.
|
overridevirtual |
Handles keypresses
Reimplemented from MM::MM1::UIElement.
|
overridevirtual |
Key binder actions
Reimplemented from MM::MM1::UIElement.