Apply Unbreaking to armor wear from Thorns
Thorns always cost the worn piece 2 durability. Run it through the same durability loss as other wear so Unbreaking can cancel points.
This commit is contained in:
@@ -303,8 +303,10 @@ impl Game<'_> {
|
||||
continue;
|
||||
}
|
||||
hits.push(1.0 + self.world.random.next_float() * 4.0);
|
||||
// ChangeItemDamage -> ItemStack.hurtAndBreak: unbreaking applies.
|
||||
let loss = self.durability_loss(&stack, 2);
|
||||
if let Some(s) = self.armor[slot].as_mut() {
|
||||
s.damage += 2;
|
||||
s.damage += loss;
|
||||
if self
|
||||
.res
|
||||
.items()
|
||||
|
||||
Reference in New Issue
Block a user