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:
13
src/main.js
13
src/main.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user