- literals preconds = action->preconditions();
- for (literals::iterator effect = preconds.begin(); effect != preconds.end(); ++effect){
- _actions[*effect] = *action;
+ Action* act = new Action(*action);
+ const literals& effects = act->effects(0);
+ for (literals::const_iterator effect = effects.begin(); effect != effects.end(); ++effect){
+ cerr << "Adding effect: " << *effect << endl;
+ _actions[*effect] = act;