Shields lose durability points every time an attack is blocked and during shield surfing.
The logic is as follows:
float damageRatio = GlobalParameter::sInstance->globalParam->shieldDamageRatio.value(); int damage = damageRatio * (param->attackPower - guardPower - additionalGuardPower); if (param->forceOnlyOneDamage) minDamage = 1; else minDamage = param->minDmg; weapon->takeDamage(max(damage, minDamage));
damageRatiois loaded from GlobalParameter ("ShieldDamageRatio" in the "Global" section).
attackPoweris the power of the attack that is being blocked by the shield.
guardPoweris the base Guard Power of the shield. It is loaded from the shield's GeneralParamList ("GuardPower" in the "WeaponCommon" section).
additionalGuardPoweris the Shield Guard Up bonus value (if any).
minDmg appears to be 1 in most cases.
In 1.6.0, ShieldDamageRatio is 0.2, meaning a shield takes a minimum of 1 damage point (in most cases), and 1 damage point for every 5 points of difference between the attack power and the guard power. 
Here is a gist of the logic:
- Whenever Link is shield surfing, a timer (which is tied to the shield) is incremented.
- If Link is surfing on a "no shield damage floor", or if the L2 norm of his velocity is lower than 0.03, then the shield takes no damage.
- Otherwise, every time the timer reaches ShieldRideBaseFrame (as configured in GlobalParameter), the shield takes
RideBreakRatio * ShieldRideHitBaseDamage * Damageand the timer is reset.
- RideBreakRatio is 1.0 for the majority of shields, and 0.2 for the Ancient Shield, which means that the latter takes shield surfing damage at a 20% rate compared to most other shields. Refer to this spreadsheet for more information on shield stats, including the hidden RideBreakRatio.
- ShieldRideBaseFrame is 120 and ShieldRideHitBaseDamage is 1. This means that shield surfing costs
RideBreakRatio * 1durability points every 4 seconds.
- This damage is also applied when you start surfing.
Since the timer is tied to the shield instance, switching to another shield will reset the timer and doing so lets the player avoid taking any surf damage.
- 0x71002F0844 [nx-1.5.0 executable]
- 0x71002CEAF4 [nx-1.5.0 executable]: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d