diff --git a/CHANGELOG b/CHANGELOG index 99c6bb67..b521df5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +Changes from 5.1.0 -> 5.2.0 +-------------------------------------------------- + Bug fixes: + -- Stored original development value for hexes in the save file to + allow pillaged regions to know what value to recover to + + Changes from 5.0.0 -> 5.1.0 -------------------------------------------------- Game Changes: @@ -70,7 +77,7 @@ Changes from 5.0.0 -> 5.1.0 SKILL_LIMIT_NONLEADERS and MAGE_NONLEADERS are both set -- Stopped riding capacity from helping in the ocean -- Made OPTION TEMPLATE OFF actually turn off templates completely - -- Corrected that region half of the shafts generated thought they were in + -- Corrected what region half of the shafts generated thought they were in -- Made the atlantis executable return appropriate result codes, instead of always claiming success -- Fixed some crash situations diff --git a/army.cpp b/army.cpp index 86d30bbd..0187c53a 100644 --- a/army.cpp +++ b/army.cpp @@ -189,17 +189,31 @@ Soldier::Soldier(Unit * u,Object * o,int regtype,int r,int ass) // Mounts of some type _are_ allowed in this region // int mountType; - for (mountType = 1; mountType < NUMMOUNTS; mountType++) { - abbr = MountDefs[mountType].abbr; + if (ItemDefs[race].type & IT_MOUNT) { + // If the man is a mount (Centaurs), then the only option + // they have for riding is the built-in one + abbr = ItemDefs[race].abr; item = unit->GetMount(abbr, canFly, canRide, ridingBonus); - if (item == -1) continue; - // Defer adding the combat bonus until we know if the weapon - // allows it. The defense bonus for riding can be added now - // however. - dskill[ATTACK_RIDING] += ridingBonus; - riding = item; - break; + } else { + for (mountType = 1; mountType < NUMMOUNTS; mountType++) { + abbr = MountDefs[mountType].abbr; + // See if this mount is an option + item = unit->GetMount(abbr, canFly, canRide, ridingBonus); + if (item == -1) continue; + // No riding other men in combat + if (ItemDefs[item].type & IT_MAN) { + item = -1; + ridingBonus = 0; + continue; + } + break; + } } + // Defer adding the combat bonus until we know if the weapon + // allows it. The defense bonus for riding can be added now + // however. + dskill[ATTACK_RIDING] += ridingBonus; + riding = item; } // @@ -458,7 +472,7 @@ void Soldier::RestoreItems() unit->items.SetNum(weapon,unit->items.GetNum(weapon) + 1); if (armor != -1) unit->items.SetNum(armor,unit->items.GetNum(armor) + 1); - if (riding != -1) + if (riding != -1 && !(ItemDefs[riding].type & IT_MAN)) unit->items.SetNum(riding,unit->items.GetNum(riding) + 1); int battleType; diff --git a/unit.cpp b/unit.cpp index c9f4e231..a7249082 100644 --- a/unit.cpp +++ b/unit.cpp @@ -2244,8 +2244,10 @@ int Unit::GetMount(AString &itm, int canFly, int canRide, int &bonus) Practice(sk); } - // Get the mount - items.SetNum(item, num - 1); + // Remove the mount from the unit to attach it to the soldier + // UNLESS it IS the soldier (looking at you, Centaurs) + if (!(ItemDefs[item].type & IT_MAN)) + items.SetNum(item, num - 1); return item; }