Shield durability/zh: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== 盾牌滑行 ==") |
(Created page with "這個 gist 裡有原始碼<ref>{{addr|a=0x71002CEAF4|ver=nx-1.5.0}}: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d</ref>(很長所以不放在這裡)...") |
||
Line 29: | Line 29: | ||
== 盾牌滑行 == | == 盾牌滑行 == | ||
這個 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. | * Whenever Link is shield surfing, a timer (which is tied to the shield) is incremented. |
Revision as of 04:16, 30 May 2020
盾牌的耐用度会随着玩家抵挡怪物的攻击与盾牌滑行逐渐降低。
抵挡攻击
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](很长所以不放在这里),总结逻辑如下:
- 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 * Damage
and the timer is reset.
In 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
- ↑ 0x71002F0844 [nx-1.5.0 executable]
- ↑ https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L28
- ↑ 0x71002CEAF4 [nx-1.5.0 executable]: https://gist.github.com/leoetlino/34a2ce6273f7cfcbbabceda24d19aa5d
- ↑ https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L26
- ↑ https://github.com/leoetlino/botw/blob/v1.6.0/Actor/GeneralParamList/GlobalParameter.gparamlist.yml#L27