[PR #2134] [MERGED] Charge melee exhaustion only when the hit hurts #4037

Closed
opened 2026-11-03 04:14:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2134
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/melee-exhaustion-on-hit


📝 Commits (1)

  • f252941 Charge melee exhaustion only when the hit hurts

📊 Changes

3 files changed (+28 additions, -15 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -5)
📝 crates/horizon-client/src/game/lan_actions.rs (+6 -2)
📝 crates/horizon-client/src/game/lan_pvp.rs (+15 -8)

📄 Description

What and why

A melee swing cost 0.1 exhaustion even when it did no damage (a miss on the target's invulnerability frames, a refused PvP hit). In vanilla the exhaustion is only charged when the hit hurt the target.

The exhaustion is now charged after the hit and only when it landed:

  • attack_mob (player on a mob) charges it at the end of the landed branch.
  • PvP: pvp_strike no longer charges it. attack_guest (host attacks a guest) and guest_attack (guest attacks a player) charge the attacker through a small pvp_exhaustion helper once pvp_land reports the victim was hurt. For a guest attacker it runs inside as_guest, so the guest pays, not the host.

Vanilla reference

Player.attack: causeFoodExhaustion(0.1F) sits inside if (wasHurt), after damageStatsAndHearts. The else branch only plays the no-damage sound.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2134 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/melee-exhaustion-on-hit` --- ### 📝 Commits (1) - [`f252941`](https://github.com/horizon-rust/horizon/commit/f252941ac15a075b982d892b0c5d6924818a5a62) Charge melee exhaustion only when the hit hurts ### 📊 Changes **3 files changed** (+28 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -5) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+6 -2) 📝 `crates/horizon-client/src/game/lan_pvp.rs` (+15 -8) </details> ### 📄 Description ## What and why A melee swing cost 0.1 exhaustion even when it did no damage (a miss on the target's invulnerability frames, a refused PvP hit). In vanilla the exhaustion is only charged when the hit hurt the target. The exhaustion is now charged after the hit and only when it landed: - `attack_mob` (player on a mob) charges it at the end of the landed branch. - PvP: `pvp_strike` no longer charges it. `attack_guest` (host attacks a guest) and `guest_attack` (guest attacks a player) charge the attacker through a small `pvp_exhaustion` helper once `pvp_land` reports the victim was hurt. For a guest attacker it runs inside `as_guest`, so the guest pays, not the host. ## Vanilla reference `Player.attack`: `causeFoodExhaustion(0.1F)` sits inside `if (wasHurt)`, after `damageStatsAndHearts`. The `else` branch only plays the no-damage sound. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:12 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4037
No description provided.