[Scummvm-git-logs] scummvm branch-2-3 -> 7b0a1a33407e9ea425a44f9f78c1d216ab4f9c36

mduggan mgithub at guarana.org
Thu Sep 9 14:33:13 UTC 2021


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

Summary:
e5944517ab ULTIMA8: Fix Crusader NPC weapons in No Remorse difficulty
7b0a1a3340 ULTIMA8: Fix Crusader shield hit damage


Commit: e5944517ab214b0dd195d1e86677ce0fa6b66b22
    https://github.com/scummvm/scummvm/commit/e5944517ab214b0dd195d1e86677ce0fa6b66b22
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-09-09T23:32:51+09:00

Commit Message:
ULTIMA8: Fix Crusader NPC weapons in No Remorse difficulty

The NPCs should get randomly harder weapons at No Remorse difficulty level, but
this never happened because I missed a line in the original to reset the "alt"
weapon type in this case.

Changed paths:
    engines/ultima/ultima8/world/actors/actor.cpp


diff --git a/engines/ultima/ultima8/world/actors/actor.cpp b/engines/ultima/ultima8/world/actors/actor.cpp
index 41641c276b..e406bc37f6 100644
--- a/engines/ultima/ultima8/world/actors/actor.cpp
+++ b/engines/ultima/ultima8/world/actors/actor.cpp
@@ -2665,7 +2665,8 @@ uint32 Actor::I_createActorCru(const uint8 *args, unsigned int /*argsize*/) {
 	uint16 wpntype2 = npcData->getWpnType2();
 
 	if (World::get_instance()->getGameDifficulty() == 4) {
-	   wpntype = NPCDat::randomlyGetStrongerWeaponTypes(shape);
+		wpntype = NPCDat::randomlyGetStrongerWeaponTypes(shape);
+		wpntype2 = wpntype;
 	}
 
 	if ((!wpntype || !wpnflag) && wpntype2) {


Commit: 7b0a1a33407e9ea425a44f9f78c1d216ab4f9c36
    https://github.com/scummvm/scummvm/commit/7b0a1a33407e9ea425a44f9f78c1d216ab4f9c36
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-09-09T23:32:56+09:00

Commit Message:
ULTIMA8: Fix Crusader shield hit damage

The `shieldCost` field from the firetype table should be used to subtract from
shields, not the weapon damage.  Normally shieldCost is a larger value, so it
affects game difficulty a lot.

Changed paths:
    engines/ultima/ultima8/world/actors/main_actor.cpp


diff --git a/engines/ultima/ultima8/world/actors/main_actor.cpp b/engines/ultima/ultima8/world/actors/main_actor.cpp
index 9709786a71..e240ae2633 100644
--- a/engines/ultima/ultima8/world/actors/main_actor.cpp
+++ b/engines/ultima/ultima8/world/actors/main_actor.cpp
@@ -995,8 +995,9 @@ int MainActor::receiveShieldHit(int damage, uint16 damage_type) {
 	int energy = getMana();
 	Kernel *kernel = Kernel::get_instance();
 
-	if (shieldtype && firetype && firetype->getShieldCost() && (firetype->getShieldMask() & shieldtype) && damage < energy) {
-		setMana(energy - damage);
+	if (shieldtype && firetype && firetype->getShieldCost() && (firetype->getShieldMask() & shieldtype)
+			&& firetype->getShieldCost() <= energy) {
+		setMana(energy - firetype->getShieldCost());
 		damage = 0;
 		AudioProcess *audio = AudioProcess::get_instance();
 		audio->playSFX(0x48, 0x10, _objId, 1, true);




More information about the Scummvm-git-logs mailing list