Shield durability: Difference between revisions

Marked this version for translation
m (prepare for translation)
(Marked this version for translation)
 
Line 3: Line 3:
<translate>
<translate>


<!--T:1-->
Shields lose durability points every time an attack is blocked and during shield surfing.
Shields lose durability points every time an attack is blocked and during shield surfing.


== Attack blocking ==
== Attack blocking == <!--T:2-->


<!--T:3-->
The logic is as follows<ref>{{addr|a=0x71002F0844|ver=nx-1.5.0}}</ref>:
The logic is as follows<ref>{{addr|a=0x71002F0844|ver=nx-1.5.0}}</ref>:


<!--T:4-->
<source lang="cpp">
<source lang="cpp">
float damageRatio = GlobalParameter::sInstance->globalParam->shieldDamageRatio.value();
float damageRatio = GlobalParameter::sInstance->globalParam->shieldDamageRatio.value();
Line 19: Line 22:
</source>
</source>


<!--T:5-->
* <code>damageRatio</code> is loaded from [[GlobalParameter]] ("ShieldDamageRatio" in the "Global" section).
* <code>damageRatio</code> is loaded from [[GlobalParameter]] ("ShieldDamageRatio" in the "Global" section).
* <code>attackPower</code> is the power of the attack that is being blocked by the shield.
* <code>attackPower</code> is the power of the attack that is being blocked by the shield.
Line 24: Line 28:
* <code>additionalGuardPower</code> is the Shield Guard Up bonus value (if any).
* <code>additionalGuardPower</code> is the Shield Guard Up bonus value (if any).


<!--T:6-->
minDmg appears to be 1 in most cases.
minDmg appears to be 1 in most cases.


<!--T:7-->
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. <ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L28</ref>
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. <ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L28</ref>


== Shield surfing ==
== Shield surfing == <!--T:8-->


<!--T:9-->
Here is a gist of the logic<ref>{{addr|a=0x71002CEAF4|ver=nx-1.5.0}}: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d</ref>:
Here is a gist of the logic<ref>{{addr|a=0x71002CEAF4|ver=nx-1.5.0}}: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d</ref>:


<!--T:10-->
* Whenever Link is shield surfing, a timer (which is tied to the shield) is incremented.
* 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.
* 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 <code>RideBreakRatio * ShieldRideHitBaseDamage * Damage</code> and the timer is reset.
* Otherwise, every time the timer reaches ShieldRideBaseFrame (as configured in [[GlobalParameter]]), the shield takes <code>RideBreakRatio * ShieldRideHitBaseDamage * Damage</code> and the timer is reset.


<!--T:11-->
In 1.6.0:
In 1.6.0:


<!--T:12-->
* 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 [https://docs.google.com/spreadsheets/u/0/d/1qhh_TLCF_1vMdpPY0QHbhYhN-eUIyh6R3Povo-gziMg/pubhtml spreadsheet] for more information on shield stats, including the hidden RideBreakRatio.
* 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 [https://docs.google.com/spreadsheets/u/0/d/1qhh_TLCF_1vMdpPY0QHbhYhN-eUIyh6R3Povo-gziMg/pubhtml spreadsheet] for more information on shield stats, including the hidden RideBreakRatio.


<!--T:13-->
* ShieldRideBaseFrame is 120<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26</ref> and ShieldRideHitBaseDamage is 1<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27</ref>. This means that shield surfing costs <code>RideBreakRatio * 1</code> durability points every 4 seconds.
* ShieldRideBaseFrame is 120<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26</ref> and ShieldRideHitBaseDamage is 1<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27</ref>. This means that shield surfing costs <code>RideBreakRatio * 1</code> durability points every 4 seconds.


<!--T:14-->
* This damage is also applied when you start surfing.
* This damage is also applied when you start surfing.


<!--T:15-->
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.
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.


translator
745

edits