package temporary;

import gameEngine.model.Detector;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import temporary.buff.Buff;
import temporary.buff.SlowBuff;
import jgame.JGObject;

public class TempAOE extends JGObject {

    public TempAOE (String name,
                    boolean unique_id,
                    double x,
                    double y,
                    int collisionid,
                    String gfxname) {
        super(name, unique_id, x, y, collisionid, gfxname);
        
    }
    
    private Set<TemporaryEnemy> mySet=new HashSet<TemporaryEnemy>();
    public void move(){
        Detector d=new Detector(this.eng);
        List<TemporaryEnemy> l= d.getEnemiesInRange((int)x, (int)y, 100);
        for(int i=0;i<l.size();i++){
            if(mySet.contains(l.get(i)))
                    ;
            else{
                Buff buff=new SlowBuff("a",true,0,0,0,"heal",50,l.get(i));
                mySet.add(l.get(i));
           }
        }
    }
}

@@ -623,16 +623,18 @@
 move()%7B%0A
+//
         
@@ -668,16 +668,18 @@
 s.eng);%0A
+//
         
@@ -744,16 +744,18 @@
 , 100);%0A
+//
         
@@ -783,16 +783,18 @@
 );i++)%7B%0A
+//
         
@@ -826,16 +826,18 @@
 et(i)))%0A
+//
         
@@ -850,16 +850,18 @@
       ;%0A
+//
         
@@ -870,16 +870,18 @@
   else%7B%0A
+//
         
@@ -939,32 +939,34 @@
 %22,50,l.get(i));%0A
+//
                 
@@ -986,16 +986,18 @@
 et(i));%0A
+//
         
@@ -997,24 +997,26 @@
           %7D%0A
+//
         %7D%0A  

comment the move function in the tempAOE class for error avoidance