盾牌的耐用度

From ZeldaMods (Breath of the Wild)
Revision as of 04:21, 30 May 2020 by Simple (talk | contribs) (Created page with "1.6.0 版的參數如下:")
Jump to navigation Jump to search
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。

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 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[4] and ShieldRideHitBaseDamage is 1[5]. This means that shield surfing costs RideBreakRatio * 1 durability 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.


References