[PR #6830] [MERGED] Fix dragon's breath damage and hit box (Part of #6771) #7123

Closed
opened 2026-11-03 06:34:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6830
Author: @Joansitoh
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/6771-dragon-breath


📝 Commits (1)

  • 4a5a130 Fix dragon breath damage: cloud scale, box and origin

📊 Changes

1 file changed (+99 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/dragon.rs (+99 -7)

📄 Description

🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally.

What

Dragon's breath clouds did double damage and used a non-vanilla hit test. In tick_breath (game/dragon.rs):

  • Damage: the instant effect is applied by AreaEffectCloud at scale 0.5, HealOrHarmMobEffect.applyInstantaneousEffect gives (int)(scale*(6<<amp)+0.5): flame cloud (amp 0) = 3, fireball cloud (DragonFireball.onHit, INSTANT_DAMAGE amp 1) = 6 (was 6 / 12).
  • Hit test: vanilla uses getEntitiesOfClass(LivingEntity, cloud.getBoundingBox()) (box [x±r, y..y+0.5, z±r], y at the bottom) then entity position within the radius horizontally. Replaced |dy| < 1 with that, modelled on tick_potion_cloud.
  • Fireball cloud origin: now the fireball's bottom (next.y - 0.5), and snapped like DragonFireball.onHit to the first living entity in the fireball box inflated by (4,2,4) with distanceToSqr < 16. Only players are covered; mobs are not.

Out of scope

20-tick per-victim cadence (age % 5 victims map), early lifetime discard, radius growth during the wait, mob snapping/mob hits.

How tested

New unit tests in dragon.rs (damage values 3/6, box height, feet above/below box, head reaching in, centre outside radius, exactly at radius, fireball snap in/out of 4 blocks). server_dragon has no breath coverage, so the unit tests carry the signal. Runs in the serving Game, so the server-thread/LAN path is covered.

pr_ready --quick (--base upstream/main): scope 1 file +99 −7, Python tests ✅ 607, rustfmt ✅, clippy ✅, horizon-client tests ✅ 609, doc tests ✅, mod API ✅.
Harness: server_dragon PASS.
Remaining affected harnesses: run by CI's parity job.

Part of #6771

Suggested label: none

🤖 Generated with Claude Code


🔄 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/6830 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6771-dragon-breath` --- ### 📝 Commits (1) - [`4a5a130`](https://github.com/horizon-rust/horizon/commit/4a5a130c2a96a485a640fa1182682e416f29d1b7) Fix dragon breath damage: cloud scale, box and origin ### 📊 Changes **1 file changed** (+99 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dragon.rs` (+99 -7) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What Dragon's breath clouds did double damage and used a non-vanilla hit test. In `tick_breath` (`game/dragon.rs`): - Damage: the instant effect is applied by `AreaEffectCloud` at scale 0.5, `HealOrHarmMobEffect.applyInstantaneousEffect` gives `(int)(scale*(6<<amp)+0.5)`: flame cloud (amp 0) = 3, fireball cloud (`DragonFireball.onHit`, INSTANT_DAMAGE amp 1) = 6 (was 6 / 12). - Hit test: vanilla uses `getEntitiesOfClass(LivingEntity, cloud.getBoundingBox())` (box `[x±r, y..y+0.5, z±r]`, y at the bottom) then entity position within the radius horizontally. Replaced `|dy| < 1` with that, modelled on `tick_potion_cloud`. - Fireball cloud origin: now the fireball's bottom (`next.y - 0.5`), and snapped like `DragonFireball.onHit` to the first living entity in the fireball box inflated by (4,2,4) with distanceToSqr < 16. Only players are covered; mobs are not. ## Out of scope 20-tick per-victim cadence (`age % 5` victims map), early lifetime discard, radius growth during the wait, mob snapping/mob hits. ## How tested New unit tests in `dragon.rs` (damage values 3/6, box height, feet above/below box, head reaching in, centre outside radius, exactly at radius, fireball snap in/out of 4 blocks). `server_dragon` has no breath coverage, so the unit tests carry the signal. Runs in the serving `Game`, so the server-thread/LAN path is covered. pr_ready --quick (`--base upstream/main`): scope 1 file +99 −7, Python tests ✅ 607, rustfmt ✅, clippy ✅, horizon-client tests ✅ 609, doc tests ✅, mod API ✅. Harness: `server_dragon` PASS. Remaining affected harnesses: run by CI's parity job. Part of #6771 Suggested label: none 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:34:18 +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#7123
No description provided.