const string Armour::paramDesc() const { TextFormatter out; float resistance = proto().damage_resistance; float melee_mod = proto().melee_mod; out("Resistance: %c%.0f%%\n", resistance >= 0.0f? '+' : '-', fabs(resistance * 100.0f)); if(melee_mod != 1.0f) out("Strength mod: %.0f%%\n", melee_mod * 100.0f); return string(out.text()); }
const string Weapon::paramDesc() const { TextFormatter out; out("Damage: %.0f", estimateDamage(false)); if(proto().burst_ammo > 1) out(" (x%d)", proto().burst_ammo); out("\n"); if(needAmmo()) out("Max ammo: %d\n", maxAmmo()); if(hasRangedAttack()) out("Accuracy: %.0f", proto().accuracy); return string(out.text()); }