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)
}
}
}