Implement advanced pathfinding and combat visual effects

- Add monster turn visual feedback (green ring on attacker, red ring on victim)
- Implement proper attack sequence with timing and animations
- Add room boundary and height level pathfinding system
- Monsters now respect room walls and can only pass through doors
- Add height level support (1-8) with stairs (9) for level transitions
- Fix attack validation to prevent attacks through walls
- Speed up hero movement animation (300ms per tile)
- Fix exploration phase message to not show on initial tile placement
- Disable hero movement during exploration phase (doors only)
This commit is contained in:
2026-01-06 16:18:46 +01:00
parent dd7356f1bd
commit 3efbf8d5fb
5 changed files with 279 additions and 31 deletions

View File

@@ -37,6 +37,11 @@ generator.grid.placeTile = (instance, variant, card) => {
setTimeout(() => {
renderer.renderExits(generator.availableExits);
// Don't show modal if we are not in Exploration phase (e.g. during Setup)
if (game.turnManager.currentPhase !== 'exploration') {
return;
}
// NEW RULE: Exploration ends turn immediately. No monsters yet.
// Monsters appear when a hero ENTERS the new room in the next turn.
ui.showModal('Exploración Completada',
@@ -98,6 +103,14 @@ game.onEntityMove = (entity, path) => {
renderer.moveEntityAlongPath(entity, path);
};
game.onEntityActive = (entityId, isActive) => {
renderer.setEntityActive(entityId, isActive);
};
game.onEntityHit = (entityId) => {
renderer.triggerDamageEffect(entityId);
};
// game.onEntitySelect is now handled by UIManager to wrap the renderer call
renderer.onHeroFinishedMove = (x, y) => {