// Happens when the item is 100% broken
//
// Happens when the item is 50% broken
//
public class RequirementHoldingItemDurability : TargetedCompareRequirementBase
{
public override bool IsValid(MinEventParams _params)
{
if (!this.ParamsValid(_params))
return false;
if (this.target == null)
return false;
var itemValue = this.target.inventory.holdingItemItemValue;
var percent = itemValue.UseTimes / itemValue.MaxUseTimes;
return !compareValues(percent, this.operation, value);
}
}