Translations:Shield durability/4/en

From ZeldaMods (Breath of the Wild)
Revision as of 03:41, 30 May 2020 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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));