Skip to content

Allow barbarian camp tiles to be entered on impassable terrain - #994

Merged
ajhalme merged 1 commit into
C7-Game:Developmentfrom
Billytifft:billy/barbarian-impassable
Sep 19, 2026
Merged

ajhalme merged 1 commit into
C7-Game:Developmentfrom
Billytifft:billy/barbarian-impassable

Conversation

@Billytifft

@Billytifft Billytifft commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Closes #993. Follow-up to #992.

Barbarian camps can be placed on impassable terrain (e.g. the WWII mod's desert) and PR #992 blocked all units from entering impassable tiles, stranding a camp's garrison once it leaves its tile — spawning works, but moving back onto the camp does not.

Per review, this treats the exemption as a camp property (like a city being implicitly reachable) rather than a barbarian-unit property: in MapUnit.ResolveIntent, impassable terrain is only a barrier when the tile has no barbarian camp.

Change:

  • MapUnit.ResolveIntent: tile.IsImpassable() && !tile.hasBarbarianCamp → disabled. Impassable terrain stays impassable everywhere except the camp tile itself.
  • Engine test verifying a camp tile on impassable terrain can be entered and pathed to.

The broader tag/rule-driven "can a unit enter a tile" engine discussed in the issue is tracked as a follow-up design note (directional: ordered unit-tags × tile-tags allow/deny rules, Lua-configurable).

@Billytifft
Billytifft force-pushed the billy/barbarian-impassable branch from bf79cb4 to 1e0fe7b Compare September 16, 2026 18:36
@Billytifft Billytifft changed the title Allow barbarian units to move on impassable terrain Allow barbarian camp tiles to be entered on impassable terrain Sep 16, 2026
@ajhalme

ajhalme commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Looks reasonable.

If we do want to make impassable tiles traversable by barbarians, that should be straightforward to implement via the owner. (This would be problematic as you could then have barb camps that couldn't be easily destroyed as they are unreachable to non-barb land units.)

@ajhalme
ajhalme merged commit 727a559 into C7-Game:Development Sep 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow barbarian units to enter impassable terrain

2 participants