public boolean attack(double power){
boolean result=super.attack(power);
//If the attack killed the agent, replace it with a resource
if(result)
sim.add(new DeadInsect(xPos, yPos, startSize, 5));
//If the Cannibal is currently consuming, it will break off of its
//food source to escape
if(mode==BehaviorState.CONSUME)
mode=BehaviorState.SEARCH;