The Override formula for "ApplyConditionDamageThroughPhysicalHit" seems to not allow weapons to degrade from attacking an entity, it seems like armor is the only thing that takes condition damage the way this method is written.
RoleplayRealism.cs:
Code: Select all
private static bool ApplyConditionDamageThroughPhysicalHit(DaggerfallUnityItem item, DaggerfallEntity owner, int damage)
{
if (item.ItemGroup == ItemGroups.Armor)
{
int amount = item.IsShield ? damage : damage * 4;
item.LowerCondition(amount, owner);
if (owner == GameManager.Instance.PlayerEntity)
Debug.LogFormat("Damaged {0} by {1} from dmg {3}, cond={2}", item.ItemName, amount, item.currentCondition, damage);
return true;
}
return false;
}
FormulaHelper.cs:
Code: Select all
private static void ApplyConditionDamageThroughPhysicalHit(DaggerfallUnityItem item, DaggerfallEntity owner, int damage)
{
Func<DaggerfallUnityItem, DaggerfallEntity, int, bool> del;
if (TryGetOverride("ApplyConditionDamageThroughPhysicalHit", out del))
if (del(item, owner, damage))
return; // Only return if override returns true
int amount = (10 * damage + 50) / 100;
if ((amount == 0) && Dice100.SuccessRoll(20))
amount = 1;
item.LowerCondition(amount, owner);
}