MM: MM1: Cleanup of encounter methods

This commit is contained in:
Paul Gilbert
2023-01-22 20:07:49 +01:00
committed by Eugene Sandulenko
parent 5e09a089ec
commit 25ba84fe0d
2 changed files with 32 additions and 2 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ void Encounter::draw() {
case SURPRISED_MONSTERS:
writeString(2, 21, STRING["dialogs.encounter.surprise"]);
writeString(1, 22, STRING["dialogs.encounter.surprise"]);
writeString(1, 22, STRING["dialogs.encounter.approach"]);
break;
case ENCOUNTER_OPTIONS: {
@@ -152,7 +152,7 @@ void Encounter::timeout() {
switch (_mode) {
case ALERT:
// Finished displaying initial encounter alert
if (enc._encounterType < 0 /* FORCE_SURPRISED */) {
if (enc._encounterType == Game::FORCE_SURPRISED) {
_mode = SURPRISED_BY_MONSTERS;
} else if (enc._encounterType == Game::NORMAL_SURPRISED ||
/* ENCOUNTER_OPTIONS */
+30
View File
@@ -46,12 +46,42 @@ private:
* Handles the end of the encounter
*/
void encounterEnded();
/**
* Initiates the combat
*/
void attack();
/**
* Try and bribe the enemies
*/
void bribe();
/**
* Try and retreat
*/
void retreat();
/**
* Try and surrender
*/
void surrender();
/**
* Ends an encounter
*/
void flee();
/**
* Decreases the alignment counter, gradually turning
* EVIL to NEUTRAL to GOOD
*/
void decreaseAlignments();
/**
* Increases the alignment counter, gradually turning
* GOOD to NEUTRAL to EVIL
*/
void increaseAlignments();
public:
Encounter();