Translations:Shield durability/4/en

From ZeldaMods (Breath of the Wild)
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));