[Scummvm-git-logs] scummvm master -> 3ceb8d7ee5eaf290be63d5a1fbc25cb4d481edb1

dreammaster noreply at scummvm.org
Sun Dec 7 02:47:04 UTC 2025


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
33bdc08bde MM: MM1: Don't try to advance monster A) during combat
3ceb8d7ee5 MM: MM1: Add missing dialogs.combat.advances string


Commit: 33bdc08bde41269be5dc9503f3ea4948362668cf
    https://github.com/scummvm/scummvm/commit/33bdc08bde41269be5dc9503f3ea4948362668cf
Author: Lili1228 (lili at lili.lgbt)
Date: 2025-12-06T18:47:01-08:00

Commit Message:
MM: MM1: Don't try to advance monster A) during combat

Fixes a (removed) failed assertion in monsterAdvances(), triggered only
from moveMonsters(). Since I'm already there, the namespace variable
_advanceIndex is now a function parameter instead.

Changed paths:
    engines/mm/mm1/game/combat.cpp
    engines/mm/mm1/game/combat.h


diff --git a/engines/mm/mm1/game/combat.cpp b/engines/mm/mm1/game/combat.cpp
index b43e5379d33..7a25411c34c 100644
--- a/engines/mm/mm1/game/combat.cpp
+++ b/engines/mm/mm1/game/combat.cpp
@@ -59,7 +59,6 @@ void Combat::clear() {
 	_destAC = 0;
 	_numberOfTimes = 0;
 	_attackerLevel = 0;
-	_advanceIndex = 0;
 	_handicapThreshold = _handicapParty = 0;
 	_handicapMonsters = _handicapDelta = 0;
 	_handicap = HANDICAP_EVEN;
@@ -67,7 +66,6 @@ void Combat::clear() {
 	_monsterIndex = _currentChar = 0;
 	_attackersCount = 0;
 	_totalExperience = 0;
-	_advanceIndex = 0;
 	_monstersResistSpells = _monstersRegenerate = false;
 	_attackAttr1.clear();
 	_attackAttr2.clear();
@@ -484,12 +482,11 @@ bool Combat::moveMonsters() {
 		return false;
 
 	bool hasAdvance = false;
-	for (uint i = 0; i < _remainingMonsters.size(); ++i) {
-		_advanceIndex = i;
-
+	// _remainingMonsters[0] can't advance to [-1]
+	for (uint i = 1; i < _remainingMonsters.size(); ++i) {
 		if (!(_remainingMonsters[i]->_status & ~MONFLAG_SILENCED) &&
 			_remainingMonsters[i]->_counterFlags & COUNTER_ADVANCES) {
-			monsterAdvances();
+			monsterAdvances(i);
 			hasAdvance = true;
 		}
 	}
@@ -497,13 +494,12 @@ bool Combat::moveMonsters() {
 	return hasAdvance;
 }
 
-void Combat::monsterAdvances() {
+void Combat::monsterAdvances(uint index) {
 	// TODO: I can't understand the advancement logic at all.
 	// So for now, I'm simply moving the monster forward one slot
-	assert(_advanceIndex > 0);
-	Monster *mon = _remainingMonsters.remove_at(_advanceIndex);
-	_remainingMonsters.insert_at(_advanceIndex - 1, mon);
-	_monsterP = _remainingMonsters[_advanceIndex - 1];
+	Monster *mon = _remainingMonsters.remove_at(index--);
+	_remainingMonsters.insert_at(index, mon);
+	_monsterP = _remainingMonsters[index];
 
 	setMode(MONSTER_ADVANCES);
 }
diff --git a/engines/mm/mm1/game/combat.h b/engines/mm/mm1/game/combat.h
index 5d7ee271b42..1f9a76bc3d0 100644
--- a/engines/mm/mm1/game/combat.h
+++ b/engines/mm/mm1/game/combat.h
@@ -50,7 +50,6 @@ protected:
 	int _destAC;
 	int _numberOfTimes;
 	int _attackerLevel;
-	int _advanceIndex;
 	int _handicapThreshold, _handicapParty;
 	int _handicapMonsters, _handicapDelta;
 	int _attackersCount;
@@ -135,7 +134,7 @@ protected:
 	void setupCanAttacks();
 
 	/**
-	 * Chooses the starting character to 
+	 * Chooses the starting character to
 	 */
 	void setupAttackersCount();
 
@@ -223,7 +222,7 @@ protected:
 	void setTreasure();
 	void clearArrays();
 	bool moveMonsters();
-	void monsterAdvances();
+	void monsterAdvances(uint index);
 	bool monsterChanges();
 	void proc2();
 	void checkParty();


Commit: 3ceb8d7ee5eaf290be63d5a1fbc25cb4d481edb1
    https://github.com/scummvm/scummvm/commit/3ceb8d7ee5eaf290be63d5a1fbc25cb4d481edb1
Author: Lili1228 (lili at lili.lgbt)
Date: 2025-12-06T18:47:01-08:00

Commit Message:
MM: MM1: Add missing dialogs.combat.advances string

It made assertions fail. I didn't check what this string is called in
the original game, I'm not sure if I have to.

Changed paths:
    devtools/create_mm/files/mm1/strings_en.yml
    dists/engine-data/mm.dat


diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml
index f7d7226b698..753e1d4972c 100644
--- a/devtools/create_mm/files/mm1/strings_en.yml
+++ b/devtools/create_mm/files/mm1/strings_en.yml
@@ -7,7 +7,7 @@ dialogs:
 			3: "--blacksmith--"
 			4: "--tavern--"
 		gold: "gold= "
-		# FIXME: Spelling incorrect. cant should be cannot. Fixing changes game data and thus may cause issues 
+		# FIXME: Spelling incorrect. cant should be cannot. Fixing changes game data and thus may cause issues
 		buy: "'a'-'f' to buy\r(- = cant use)"
 		sell: "'a'-'f' to sell"
 		gather: "'g' gather gold\r'#' other char"
@@ -91,7 +91,7 @@ dialogs:
 		3: "Fortunately, you may renew"
 		4: "your quest from the last"
 		5: "inn in which you stayed"
-		6: "by pressing 'Enter'"	
+		6: "by pressing 'Enter'"
 	inn:
 		title: "(%c) Inn of "
 		to_view: "to view"
@@ -190,7 +190,7 @@ dialogs:
 			4: "a h-orc archer"
 			5: "a human cleric"
 			6: "a blue dragon"
-			7: "a gray minotaur"			
+			7: "a gray minotaur"
 		messages:
 			0: "Services rendered, secrets unfold\nthe brothers together\nlead to treasures untold\n\nfive towns you must travel\nfor this quest to unravel"
 			1: "Seek the wizard Ranalou\nin his lair at the Korin Bluffs\nsix castles he will send you to\nbut Doom will be quite tough!\ncruelty and kindness\nmeasured throughout\njudgement day is then sought out"
@@ -407,6 +407,7 @@ dialogs:
 		delay_currently: "(currently= %d)"
 		infiltration: "infiltrates the ranks!"
 		exchange_places: "Exchange places with (1-%c)?"
+		advances: " advances!"
 		status:
 			0: "(paralyze)"
 			1: "(webbed)  "
@@ -445,7 +446,7 @@ enhdialogs:
 		sell: "Sell"
 		for_gold: "for %d gold"
 		areas:
-			weapons: "Weapons"	
+			weapons: "Weapons"
 			armor: "Armor"
 			misc: "Misc"
 		buttons:
@@ -582,7 +583,7 @@ enhdialogs:
 			equip: "\x01""37Equip"
 			remove: "\x01""37Rem"
 			discard: "\x01""37Disc"
-			trade: "\x01""37Trade"		
+			trade: "\x01""37Trade"
 			use: "\x01""37Use"
 			charge: "\x01""37Charg"
 			copy: "\x01""37Copy"
@@ -619,7 +620,7 @@ enhdialogs:
 			ac: "A.C."
 			cond: "Cond"
 	rest:
-		too_dangerous: "Too dangerous to rest here!"		
+		too_dangerous: "Too dangerous to rest here!"
 	spellbook:
 		title: "Spells for"
 		spell_points: "Spell Pts"
@@ -904,7 +905,7 @@ monster_spells:
 	gazes: "gazes"
 	acid_arrow: "acid arrow"
 	calls_elements: "calls uppon the elements"
-	cold_beam: "cold beam"       
+	cold_beam: "cold beam"
 	dancing_sword: "dancing sword"
 	magic_drain: "magic drain"
 	finger_of_death: "finger of death"
@@ -1003,7 +1004,7 @@ maps:
 		blacksmith_inside: "A man wearing a leather apron speaks:\n\"Distinguished travelers, you've come to\nthe right place. Can I help you (Y/N)?\""
 		inn_inside: "The innekeeper asks: \"Would you like to sign in (Y/N)?\""
 		market_inside: "Behind the counter, an overweight dwarf\nexclaims: \"You look like a hungry bunch!\nWould you like to buy some food (Y/N)?\""
-		temple_inside: "Several ornately robed clerics approach\nthe party and ask, \"Do you seek our help (Y/N)?\""		
+		temple_inside: "Several ornately robed clerics approach\nthe party and ask, \"Do you seek our help (Y/N)?\""
 		training_inside: "Before you are various groups engaged in\ntraining exercises. Worg,the guildmaster\nasks, \"Do you require training (Y/N)?\""
 
 		leprechaun: "A tenacious leprechaun appears saying,\n\"Traveling the roads is quite dangerous\nsave for the strong and courageous,\nonly 1 gem you lose and i'll send you\nto the town you choose.\"\n\n'ESC' to go back      Which town (1-5)?"
@@ -1091,7 +1092,7 @@ maps:
 
 		telgoran1: "An elf dressed in robes approaches...\n\n"
 		telgoran2: "\"Friends, I am telgoran. This scroll you\nhave brought me will be very helpful\n(+2500 exp) Here's 1500 gold for your\nservices. I'll tell you a secret, if\ntreasure is what you want...\""
-		telgoran3: "\"The brothers you must find...\nPortsmith and Algary are combined.\"" 
+		telgoran3: "\"The brothers you must find...\nPortsmith and Algary are combined.\""
 		telgoran4: "\"You're not the couriers!\""
 	emap03:
 		blacksmith_inside: "A young gnome materializes, asking,\n\"Would you be wanting my services (Y/N)?\""
@@ -1584,7 +1585,7 @@ maps:
 	emap37:
 		okrim: "Okrim"
 		okrim1: "A ghostlike figure rises from the body of Okrim and speaks, \"In exchange for my ring, forfeit a life. Accept (Y/N)?\""
-	
+
 	map38:
 		message4: "Etched in gold, message 4 reads:'\nof-be-has-true-knowledge-plane-a-level-'\nto-reality-it"
 		banner: "A banner reads:\nthe labyrinth of lazzeruth...\nfew have entered, none have returned!"
diff --git a/dists/engine-data/mm.dat b/dists/engine-data/mm.dat
index 96b0e43bf34..b81a813fddb 100644
Binary files a/dists/engine-data/mm.dat and b/dists/engine-data/mm.dat differ




More information about the Scummvm-git-logs mailing list