Shield durability/zh: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
(Created page with "盾牌的耐用度")
 
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 2: Line 2:




Shields lose durability points every time an attack is blocked and during shield surfing.
盾牌的耐用度會隨著玩家抵擋怪物的攻擊與踩盾滑行逐漸降低。


== Attack blocking ==
== 抵擋攻擊 ==


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>:
Line 18: Line 18:
</source>
</source>


* <code>damageRatio</code> is loaded from [[GlobalParameter]] ("ShieldDamageRatio" in the "Global" section).
* <code>damageRatio</code> (攻換防比)是從 [[GlobalParameter]] 裡來的("Global" 底下的 "ShieldDamageRatio")。
* <code>attackPower</code> is the power of the attack that is being blocked by the shield.
* <code>attackPower</code> 是被抵擋的攻擊的攻擊力。
* <code>guardPower</code> is the base Guard Power of the shield. It is loaded from the shield's [[GeneralParamList]] ("GuardPower" in the "WeaponCommon" section).
* <code>guardPower</code > 是盾牌的防禦力,也是 [[GeneralParamList]] 來的("WeaponCommon" 底下的 "GuardPower")。
* <code>additionalGuardPower</code> is the Shield Guard Up bonus value (if any).
* <code>additionalGuardPower</code> 就是防禦力加成加多少(沒有加成則是零)。


minDmg appears to be 1 in most cases.
minDmg (最小損失)在大部分的時候都是 1 的樣子。意思是扣耐用的時候至少會扣 1 點(而不是 0.2 點或 0.75 點)。


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>
1.6.0 版的 ShieldDamageRatio (攻換防比)是 0.2。也就是說,敵人的攻擊力比防禦力低的時候,抵擋一次扣 1 點耐用度。攻擊力比防禦高的時候,攻擊力每增加 5 點,盾牌的耐用度就多扣 1 點。<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L28</ref>


== Shield surfing ==
== 踩盾滑行 ==


Here is a gist of the logic<ref>{{addr|a=0x71002CEAF4|ver=nx-1.5.0}}: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d</ref>:
這個 gist 裡有原始碼<ref>{{addr|a=0x71002CEAF4|ver=nx-1.5.0}}: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d</ref>(很長所以不放在這裡),總結邏輯如下:


* 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.
* 如果林克在「光滑的表面」滑行''''滑行的速度小於 0.03,則不扣耐用度。
* Otherwise, every time the timer reaches ShieldRideBaseFrame (as configured in [[GlobalParameter]]), the shield takes <code>RideBreakRatio * ShieldRideHitBaseDamage * Damage</code> and the timer is reset.
* 否則,每當計時器計到 ShieldRideBaseFrame (as configured in [[GlobalParameter]]) 這個數字時,盾牌的耐用度就會減少 <code>RideBreakRatio * ShieldRideHitBaseDamage * Damage</code> 這麼多點,然後計時器歸零。


In 1.6.0:
1.6.0 版的參數如下:


* 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(滑致損比)都是 1.0。例外的盾牌包括古代兵裝·盾的 0.2。換句話說,同樣的滑行時間,古代兵裝·盾損失的耐用度是別的盾牌的 20%。在[https://docs.google.com/spreadsheets/u/0/d/1qhh_TLCF_1vMdpPY0QHbhYhN-eUIyh6R3Povo-gziMg/pubhtml 這個表格] 裡列出了所有盾牌的 RideBreakRatio,以及其他更多隱藏參數。


* 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 (盾滑基礎幀數)是 120<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26</ref>,而 ShieldRideHitBaseDamage (盾滑基礎損失)則是1<ref>https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27</ref>。意即,每 120 幀(現實四秒)扣耐用度 <code>RideBreakRatio * 1</code> 這麼多點。


* 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.
我們知道盾牌的計時器是和「單個盾牌」綁定的(每「面」盾牌都有一個專屬的計時器,注意不是每「種」),所以滑行的途中換盾牌就會讓計時器歸零。從技術上來說,只要滑行的時候勤(四秒內)換盾牌,就可以不扣任何耐用度。





Latest revision as of 05:04, 30 May 2020

Other languages:


盾牌的耐用度會隨著玩家抵擋怪物的攻擊與踩盾滑行逐漸降低。

抵擋攻擊

The logic is as follows[1]:

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));
  • damageRatio (攻換防比)是從 GlobalParameter 裡來的("Global" 底下的 "ShieldDamageRatio")。
  • attackPower 是被抵擋的攻擊的攻擊力。
  • guardPower 是盾牌的防禦力,也是 bgparamlist 來的("WeaponCommon" 底下的 "GuardPower")。
  • additionalGuardPower 就是防禦力加成加多少(沒有加成則是零)。

minDmg (最小損失)在大部分的時候都是 1 的樣子。意思是扣耐用的時候至少會扣 1 點(而不是 0.2 點或 0.75 點)。

1.6.0 版的 ShieldDamageRatio (攻換防比)是 0.2。也就是說,敵人的攻擊力比防禦力低的時候,抵擋一次扣 1 點耐用度。攻擊力比防禦高的時候,攻擊力每增加 5 點,盾牌的耐用度就多扣 1 點。[2]

踩盾滑行

這個 gist 裡有原始碼[3](很長所以不放在這裡),總結邏輯如下:

  • 林克在盾牌上滑行的時候,一個計時器(和盾綁定)會紀錄滑行的時間。
  • 如果林克在「光滑的表面」滑行滑行的速度小於 0.03,則不扣耐用度。
  • 否則,每當計時器計到 ShieldRideBaseFrame (as configured in GlobalParameter) 這個數字時,盾牌的耐用度就會減少 RideBreakRatio * ShieldRideHitBaseDamage * Damage 這麼多點,然後計時器歸零。

1.6.0 版的參數如下:

  • 大部分盾牌的 RideBreakRatio(滑致損比)都是 1.0。例外的盾牌包括古代兵裝·盾的 0.2。換句話說,同樣的滑行時間,古代兵裝·盾損失的耐用度是別的盾牌的 20%。在這個表格 裡列出了所有盾牌的 RideBreakRatio,以及其他更多隱藏參數。
  • ShieldRideBaseFrame (盾滑基礎幀數)是 120[4],而 ShieldRideHitBaseDamage (盾滑基礎損失)則是1[5]。意即,每 120 幀(現實四秒)扣耐用度 RideBreakRatio * 1 這麼多點。
  • 盾跳後盾牌觸地時也會扣一次上述的耐用度。

我們知道盾牌的計時器是和「單個盾牌」綁定的(每「面」盾牌都有一個專屬的計時器,注意不是每「種」),所以滑行的途中換盾牌就會讓計時器歸零。從技術上來說,只要滑行的時候勤(四秒內)換盾牌,就可以不扣任何耐用度。


References