Commit 95d11a24 authored by Fardale's avatar Fardale
Browse files

Merge branch 'master' of gitlab.crans.org:genie_logiciel_2015/the_dungeon_project

parents 7840f505 bfb791b1
......@@ -44,18 +44,15 @@ public class StraightEntity extends AbstractEntity {
this.random_move();
}
}
else{
Direction d = this.relayer.getCharacter().getDirection();
double r = random();
if(r<0.75){
this.relayer.move(d);
}
else{this.random_move();}
// A*
/*List<Entity> entityList=gameState.getAllEntities();
int dX = entityList.get(this.Choose_victim()).getX();
int dY = entityList.get(this.Choose_victim()).getY();
int sX = relayer.getCharacter().getX();
int sY = relayer.getCharacter().getY();
Direction dir = AI.alpha_star(sX, sY, dX, dY,map.getWidth(),map.getHeight());
//Logging.getInstance().getLogger().info(dir.toString());
this.relayer.move(dir);*/
}
// attack
this.relayer.tryToCastAbility(0);
......
......@@ -41,7 +41,7 @@ public class GameContent implements Serializable{
for(Entity e:map.getEntities()){
gameState.addEntity(e);
Relayer dmr = Relayers.addNewRelayer(e);
AIControler.add(this,dmr, EnumBehaviourType.Basic);
AIControler.add(this,dmr, EnumBehaviourType.Straight);
}
}
int posX=(map.getPositionPlayerStart().getI())*Point.TileScale;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment