Skip to content

Armour damage reduction and durability in combat #141

Description

@xRookieFight

Problem

Armour items are registered (item/armor.v) but session/combat.v never reads them. Wearing a full set of diamond armour does not reduce incoming damage, armour points are not shown, armour toughness is unused, and armour takes no durability damage when it absorbs a hit.

Proposed solution

  • Compute armour points and toughness from the equipped armour slots and apply the vanilla damage reduction formula.
  • Send the armour attribute so the client displays it.
  • Damage armour durability on hit and break pieces at zero, with the break sound.
  • Skip reduction for damage types that bypass armour, and apply protection enchantments once enchantment effects exist.

Scope

session/combat.v, item/armor.v, item/durability.v, player/attributes.v.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions