fix: marsh move-cost parity — grounded creatures enter slow terrain one step free (asymmetric with players) #182
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during the critical review of #155 (terrain move-cost, #138).
Problem
Marsh move-cost is applied asymmetrically to players vs creatures.
MovementSystem.cs): gated onmap.MoveCostTicks(cooldown, player.Position, target)=Max(cost(from), cost(into))— so a player is slowed entering marsh (the entry step already costs the marsh cadence).CreatureSystem.cs): gated onmap.MoveCostTicks(baseCadence, creature.Position, creature.Position)= cost of the tile it currently stands on only. So a creature steps into marsh at dry-ground speed for the entry step, and only slows once it is already standing in the marsh.Net effect: a chasing creature gets one "free" fast entry step at the marsh boundary, gaining ground on a fleeing player. This contradicts the code's own comment in
CreatureSystem— "a chase through marsh slows pursuer and quarry alike (marsh is not a mob-favoured trap)": it is, mildly, mob-favoured at every slow-terrain entry.Scope
Max(from, into)), not just its current tile. The move target isn't known untilAi.Think, so either evaluate the cadence after Think (charging the tile it moves onto) or restructure so the entry step is charged.IgnoresTerrainMoveCost) stay exempt.MoveCost(no per-terrain type check).Definition of Done
Base DoD applies on top.
MoveCost > 1) is charged the slow-terrain cadence for that entry step — matching player semantics — verified by a unit test againstWorld(no networking).CreatureSystemcomment and the mechanic agree: entering/leaving slow terrain slows pursuer and quarry alike (no free mob entry step).