From f8fd75df4d5f74ff6701a40dbf08aed42f85b179 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 6 Oct 2012 02:06:41 +0200 Subject: [PATCH] reversed order of monster checks and added some TODOs --- src/map/MapState.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/map/MapState.cpp b/src/map/MapState.cpp index 62e4802..108d97c 100644 --- a/src/map/MapState.cpp +++ b/src/map/MapState.cpp @@ -196,15 +196,20 @@ void MapState::LockEntities() { void MapState::CheckMonster() { Vector coords(map->TileCoordinates(controlled->Position())); Vector neighbor[4]; - neighbor[0] = Vector(coords.X() - 1, coords.Y()); // W - neighbor[1] = Vector(coords.X(), coords.Y() + 1); // S - neighbor[2] = Vector(coords.X() + 1, coords.Y()); // E - neighbor[3] = Vector(coords.X(), coords.Y() - 1); // N + neighbor[0] = Vector(coords.X(), coords.Y() - 1); // N + neighbor[1] = Vector(coords.X() + 1, coords.Y()); // E + neighbor[2] = Vector(coords.X(), coords.Y() + 1); // S + neighbor[3] = Vector(coords.X() - 1, coords.Y()); // W for (int i(0); i < 4; ++i) { for (std::vector::iterator e(entities.begin()), end(entities.end()); e != end; ++e) { if ((*e)->Hostile() && map->TileCoordinates((*e)->Position()) == neighbor[i]) { - // remove entity, push battle state and transition and halt all other activity + // TODO: check for turn advantage, see #26 + // TODO: remove entity, push battle state and transition and halt all other activity + // needed information here: + // - battle background (from tile?) + // - monsters + layout (from entity) + // - battle resources (from global resources) } } } -- 2.39.2