[PR #5275] [MERGED] fix(mobs): frogs swim and prefer the shallows when they path #6181

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5275
Author: @sirrayi
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/frog-amphibious-nav


📝 Commits (1)

  • a343318 fix(mobs): frogs swim and prefer the shallows when they path

📊 Changes

7 files changed (+62 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/mobs/aquatic.rs (+3 -1)
📝 crates/horizon-client/src/mobs/doors.rs (+1 -1)
📝 crates/horizon-client/src/mobs/frog.rs (+6 -0)
📝 crates/horizon-client/src/mobs/nav.rs (+44 -8)
📝 crates/horizon-client/src/mobs/turtle.rs (+3 -1)
📝 crates/horizon-client/src/mobs/undead.rs (+3 -1)
📝 tools/port_map/game-012.tsv (+2 -2)

📄 Description

🤖 Opened by sirrayi's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by sirrayi personally.

What and why

A frog paths as a plain walker. Frog.FrogPathNavigation is an AmphibiousPathNavigation, and Frog overrides prefersShallowSwimming — but mobs/frog.rs::register only set the movement controller and never the navigation kind, so a frog kept NavKind::Ground: it would not cross water, and no frog ever took a shallow bank over a deep one. That is the Frog.FrogPathNavigation.createPathFinder row of #3512.

The path finder already had the field for it — Evaluator::Amphibious { prefers_shallow }, which costs the water nodes deeper than ten blocks under sea level — but Navigation::evaluator hard-coded it to false, so nothing could set it. NavKind::Amphibious now carries the flag, the evaluator passes it through, a frog sets it, and the axolotl, drowned and turtle keep the plain form they had.

Vanilla reference

Frog.FrogPathNavigation (AmphibiousPathNavigation, with the frog's prefersShallowSwimming override). canCutCorner is the same three the generic finder refuses, so its row is port now too.

Test: mobs::nav::tests::the_amphibious_navigation_keeps_its_shallow_preference — no assets needed, it builds a Navigation and checks the evaluator keeps the flag both ways.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Other projects' code

none

Self-check

cargo fmt --all --check                                  clean
cargo clippy -p horizon-client --lib --tests -- -D warnings
  Finished (no warnings)
cargo test -p horizon-client --lib mobs::nav
  the_amphibious_navigation_keeps_its_shallow_preference ... ok
python3 tools/check_public_tree.py
  Public tree check passed.

tools/pr_ready.py still cannot run here (it needs Python 3.11+; this machine has 3.9) — the block above is its Rust half. The harness this can reach is mob_ai (the frog's navigation), which CI runs.

tools/port_map/game-012.tsv: both Frog.FrogPathNavigation rows are port now.

🤖 Generated with DeepSeek Harness (deepseek-v4.1-flash)


🔄 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/5275 **Author:** [@sirrayi](https://github.com/sirrayi) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/frog-amphibious-nav` --- ### 📝 Commits (1) - [`a343318`](https://github.com/horizon-rust/horizon/commit/a343318ba3ee720fe673ae4b787ad8f1a85e6c06) fix(mobs): frogs swim and prefer the shallows when they path ### 📊 Changes **7 files changed** (+62 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/aquatic.rs` (+3 -1) 📝 `crates/horizon-client/src/mobs/doors.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/frog.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs/nav.rs` (+44 -8) 📝 `crates/horizon-client/src/mobs/turtle.rs` (+3 -1) 📝 `crates/horizon-client/src/mobs/undead.rs` (+3 -1) 📝 `tools/port_map/game-012.tsv` (+2 -2) </details> ### 📄 Description > 🤖 Opened by sirrayi's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by sirrayi personally. ## What and why A frog paths as a plain walker. `Frog.FrogPathNavigation` is an `AmphibiousPathNavigation`, and `Frog` overrides `prefersShallowSwimming` — but `mobs/frog.rs::register` only set the movement controller and never the navigation kind, so a frog kept `NavKind::Ground`: it would not cross water, and no frog ever took a shallow bank over a deep one. That is the `Frog.FrogPathNavigation.createPathFinder` row of #3512. The path finder already had the field for it — `Evaluator::Amphibious { prefers_shallow }`, which costs the water nodes deeper than ten blocks under sea level — but `Navigation::evaluator` hard-coded it to `false`, so nothing could set it. `NavKind::Amphibious` now carries the flag, the evaluator passes it through, a frog sets it, and the axolotl, drowned and turtle keep the plain form they had. ## Vanilla reference `Frog.FrogPathNavigation` (`AmphibiousPathNavigation`, with the frog's `prefersShallowSwimming` override). `canCutCorner` is the same three the generic finder refuses, so its row is `port` now too. Test: `mobs::nav::tests::the_amphibious_navigation_keeps_its_shallow_preference` — no assets needed, it builds a `Navigation` and checks the evaluator keeps the flag both ways. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Other projects' code none ## Self-check ``` cargo fmt --all --check clean cargo clippy -p horizon-client --lib --tests -- -D warnings Finished (no warnings) cargo test -p horizon-client --lib mobs::nav the_amphibious_navigation_keeps_its_shallow_preference ... ok python3 tools/check_public_tree.py Public tree check passed. ``` `tools/pr_ready.py` still cannot run here (it needs Python 3.11+; this machine has 3.9) — the block above is its Rust half. The harness this can reach is `mob_ai` (the frog's navigation), which CI runs. `tools/port_map/game-012.tsv`: both `Frog.FrogPathNavigation` rows are `port` now. 🤖 Generated with [DeepSeek Harness](https://www.deepseek.com) (deepseek-v4.1-flash) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:36 +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#6181
No description provided.