]> git.localhorst.tv Git - l2e.git/commitdiff
reversed order of monster checks
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 00:06:41 +0000 (02:06 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 00:06:41 +0000 (02:06 +0200)
and added some TODOs

src/map/MapState.cpp

index 62e480267ca092f31a178f2ffe2274f8792fc229..108d97c123c7d4e9f60b81170fcd3019ff0002f9 100644 (file)
@@ -196,15 +196,20 @@ void MapState::LockEntities() {
 void MapState::CheckMonster() {
        Vector<int> coords(map->TileCoordinates(controlled->Position()));
        Vector<int> neighbor[4];
-       neighbor[0] = Vector<int>(coords.X() - 1, coords.Y()); // W
-       neighbor[1] = Vector<int>(coords.X(), coords.Y() + 1); // S
-       neighbor[2] = Vector<int>(coords.X() + 1, coords.Y()); // E
-       neighbor[3] = Vector<int>(coords.X(), coords.Y() - 1); // N
+       neighbor[0] = Vector<int>(coords.X(), coords.Y() - 1); // N
+       neighbor[1] = Vector<int>(coords.X() + 1, coords.Y()); // E
+       neighbor[2] = Vector<int>(coords.X(), coords.Y() + 1); // S
+       neighbor[3] = Vector<int>(coords.X() - 1, coords.Y()); // W
 
        for (int i(0); i < 4; ++i) {
                for (std::vector<Entity *>::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)
                        }
                }
        }