Let enemy workers claim room tiles (DK2-style), behind a config switch - #35
Conversation
The DK2-style side of the claimable-or-destructible question: when RoomsClaimableByEnemies is set to 1 in rooms.cfg, enemy workers can dance room tiles down one at a time, the way they already claim ground, bridges and traps. A claimed tile moves into a room of the same type owned by the claimer, merging with an adjacent room of theirs, and the victim's room splits when it is cut in two. Room-level state travels through the existing splitRoom hook, so a treasury tile takes its share of the stored gold with it. What was lost can be danced back. The switch ships as 0: default behaviour is exactly as before, rooms can only be destroyed. The dungeon temple is never claimable since losing it means defeat and that path expects destruction. Portals keep their whole-room claim, bridges their per-tile claim. The per-tile claim progress moves from BridgeTileData into the base TileData so every room type shares it; TrapTileData keeps its own field of the same name until trap serialization can move too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Great job, except one cannot visually estimate which room belongs to whom when playing game. This would be a large drawback,I will have to work on that SOMETIME. |
|
Fixed in #37 — room floors now carry the owning seat's colour, the same way claimed ground does. Every room floor material runs through the shared That PR stands on its own (the ambiguity already exists today with enemy rooms seen through vision), so it doesn't need to wait for the claimable-rooms decision — but with it merged, this PR's claimed squares recolour one by one as they change hands, which is exactly the feedback the mechanic was missing. The blend weight (currently 0.5) is a single knob if you want the tint subtler or louder, and the look can be switched to a claimed-style cross overlay instead of a whole-floor tint if you prefer. |
Issue tomluchowski#42 asks for explicit types instead of auto. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Still .... With this on, my fighters still are in the spearhead when attacking. That means they reach the enemy rooms first and destroy them , so from the actual point of gameplay not much has changed. If there could be a third switch like : |
With rooms both claimable and destructible, fighters at the spearhead still reach enemy rooms first and destroy them, so in practice little changed. RoomsClaimableByEnemies now takes three values: 0 keeps the historical behaviour (destroy only), 1 allows both, and 2 lets only workers take a room, tile by tile — rooms in that mode are not attackable, so fighters skip them when choosing targets, and damage that bypasses target selection is dropped in Room::takeDamage. The dungeon temple, which cannot be claimed, stays destructible in every mode since destroying it is how a player is defeated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Done in 81cbc4f — In mode 2 a room reports itself as not attackable, so fighters never pick it as a target — that is the same check One exception I had to keep: the dungeon temple cannot be claimed (that was already the case), so in mode 2 it stays destructible — otherwise no game could ever be won. If you would rather the temple be claimable too, say so and I will look at what the defeat path needs for that. Note for when this and #33 both land: Verified: builds, |
Proposal 4 of the set following the mechanics discussion in #23 — the "rooms claimable" (DK2-style) side of the "claimable or destructible" question, as a prototype to play-test, off by default.
Builds on top of the square-by-square bridge PR (#34) and generalizes its tile-transfer machinery: enemy workers can dance enemy room tiles down one at a time, exactly like ground tiles and (now) bridge tiles. When a room tile falls it moves into a room of the same type owned by the claimer — merging with an adjacent room of theirs when there is one — and the victim's room splits if it was cut in two. Room-level state is shared out through the existing
splitRoomhook, so e.g. a treasury tile takes its share of the stored gold with it (and merges it back into the claimer's treasury on absorption).Because Tom explicitly wanted a community discussion on this one, the whole mechanic is gated behind a config switch in
rooms.cfg, with three settings:0keeps today's behaviour.1is the DK2-ish mode where conquest is possible and reversible — you can dance your dormitory back after driving the enemy out — while rooms can still be razed.2(Tom's request below) takes destruction off the table: a room in this mode is not attackable, so fighters skip it when picking targets and stray damage (boulders, area spells) is dropped inRoom::takeDamage; the only way it changes hands is being danced away. Workers still only reach tiles at the border of fully-claimed ground, so a room deep in enemy territory erodes from the edge inward, which in practice makes claiming slower than destruction unless the area is secured.Portals keep their own whole-room claiming, bridges their per-tile claiming; the dungeon temple is excluded from claiming (losing it means defeat and that path expects destruction).
Points for the Discord/community discussion this is meant to feed:
<RoomName>ClaimValue) if the flat 1.0-per-tile feels wrong.Validated: builds, full test suite passes via
ctest, both with the switch off (default behaviour unchanged) and on.🤖 Generated with Claude Code