Random bots gear related enhancements

This commit is contained in:
Yunfan Li
2025-07-05 20:14:29 +08:00
parent 64df7439d8
commit f0c6aaff0b
17 changed files with 174 additions and 79 deletions

View File

@@ -187,7 +187,8 @@ void EquipAction::EquipItem(Item* item)
// Priority 1: Replace main hand if the new weapon is strictly better
// and if conditions allow (e.g. no conflicting 2H logic)
bool betterThanMH = (newItemScore > mainHandScore);
bool mhConditionOK = ((invType != INVTYPE_2HWEAPON && !have2HWeaponEquipped) ||
// If a one-handed weapon is better, we can still use it instead of a two-handed weapon
bool mhConditionOK = (invType != INVTYPE_2HWEAPON ||
(isTwoHander && !canTitanGrip) ||
(canTitanGrip && isValidTGWeapon));