[Scummvm-git-logs] scummvm master -> 0a0d66c49a71b97aea4be4b24d157ec56e5da153

dreammaster noreply at scummvm.org
Sat May 9 22:25:45 UTC 2026


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:
89360c89dd MM: MM1: Stop allowing trading more gems/gold/food than you have
0a0d66c49a MM: MM1: Don't allow free temple healing when healing should be disabled


Commit: 89360c89dd9bb4cf658f7a7c7a6301a4bc0eb1e1
    https://github.com/scummvm/scummvm/commit/89360c89dd9bb4cf658f7a7c7a6301a4bc0eb1e1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-10T08:10:03+10:00

Commit Message:
MM: MM1: Stop allowing trading more gems/gold/food than you have

Changed paths:
    NEWS.md
    engines/mm/mm1/views_enh/character_inventory.cpp


diff --git a/NEWS.md b/NEWS.md
index 0990dfafc9c..1671598aa87 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -28,6 +28,7 @@ For a more comprehensive changelog of the latest experimental code, see:
 
  MM:
    - Reworked keymapper for MM1.
+   - Fixed MM1 Enhanced allowing trading more than the character owned.
 
  SLUDGE:
    - Added two more games to detection, "Sam and Max Flintlocked" and
diff --git a/engines/mm/mm1/views_enh/character_inventory.cpp b/engines/mm/mm1/views_enh/character_inventory.cpp
index 199f442ae80..d298d551c28 100644
--- a/engines/mm/mm1/views_enh/character_inventory.cpp
+++ b/engines/mm/mm1/views_enh/character_inventory.cpp
@@ -346,14 +346,17 @@ void CharacterInventory::trade(const Common::String &mode, int amount, Character
 	Character &src = *g_globals->_currCharacter;
 
 	if (mode == "GEMS") {
+		amount = MIN<uint16>(amount, src._gems);
 		src._gems -= amount;
 		destChar->_gems = MIN(destChar->_gems + amount, 0xffff);
 
 	} else if (mode == "GOLD") {
+		amount = MIN<uint16>(amount, src._gold);
 		src._gold -= amount;
 		destChar->_gold += amount;
 
 	} else if (mode == "FOOD") {
+		amount = MIN<uint16>(amount, src._food);
 		src._food -= amount;
 		destChar->_food = MIN(destChar->_food + amount, MAX_FOOD);
 	}


Commit: 0a0d66c49a71b97aea4be4b24d157ec56e5da153
    https://github.com/scummvm/scummvm/commit/0a0d66c49a71b97aea4be4b24d157ec56e5da153
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-10T08:25:36+10:00

Commit Message:
MM: MM1: Don't allow free temple healing when healing should be disabled

Changed paths:
    NEWS.md
    engines/mm/mm1/views_enh/locations/temple.cpp


diff --git a/NEWS.md b/NEWS.md
index 1671598aa87..126806cdf0a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -29,6 +29,7 @@ For a more comprehensive changelog of the latest experimental code, see:
  MM:
    - Reworked keymapper for MM1.
    - Fixed MM1 Enhanced allowing trading more than the character owned.
+   - Fixed MM1 Enhanced allowing free temple healing where it shouldn't.
 
  SLUDGE:
    - Added two more games to detection, "Sam and Max Flintlocked" and
diff --git a/engines/mm/mm1/views_enh/locations/temple.cpp b/engines/mm/mm1/views_enh/locations/temple.cpp
index 1bf067e08e3..03ec80e4497 100644
--- a/engines/mm/mm1/views_enh/locations/temple.cpp
+++ b/engines/mm/mm1/views_enh/locations/temple.cpp
@@ -117,16 +117,20 @@ void Temple::writeOption(int row, char c, const Common::String &text,
 bool Temple::msgKeypress(const KeypressMessage &msg) {
 	switch (msg.keycode) {
 	case Common::KEYCODE_h:
-		restoreHealth();
+		if (_healCost)
+			restoreHealth();
 		break;
 	case Common::KEYCODE_u:
-		uncurseItems();
+		if (_uncurseCost)
+			uncurseItems();
 		break;
 	case Common::KEYCODE_r:
-		restoreAlignment();
+		if (_alignmentCost)
+			restoreAlignment();
 		break;
 	case Common::KEYCODE_d:
-		donate();
+		if (_donateCost)
+			donate();
 		break;
 	case Common::KEYCODE_g:
 		g_globals->_currCharacter->gatherGold();




More information about the Scummvm-git-logs mailing list