Skip to main content
The Deno 2 Release Candidate is here
Learn more
method RepairHelper.prototype.getRandomisedArmorRepairDegradationValue
import { RepairHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/mod.ts";

Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material

Parameters

armorMaterial: string

What material is the armor being repaired made of

isRepairKit: boolean

Was a repair kit used

armorMax: number

Max amount of durability item can have

traderQualityMultipler: number

Different traders produce different loss values

Returns

number

Amount to reduce max durability by