Exemplo n.º 1
0
 public int[][] getMoveSpaceActor(int[][] res, SRPGActors actors, int atk, int def) {
   if ((def & 8) == 0) {
     for (int i = 0; i < actors.size(); i++) {
       SRPGActor actor = actors.find(i);
       if (actor.isVisible()
           && actor.getActorStatus().group != actors.find(atk).getActorStatus().group
           && actor.isVisible()
           && actor.getActorStatus().hp > 0) {
         res[actor.getPosY()][actor.getPosX()] = -1;
       }
     }
   }
   return res;
 }
Exemplo n.º 2
0
 public int[][] getMoveSpaceAll(SRPGActors actors, int i) {
   int move = actors.find(i).getActorStatus().movetype;
   int[][] res = new int[height][width];
   for (int y = 0; y < height; y++) {
     for (int x = 0; x < width; x++) {
       res[y][x] = getMoveCost(i, move, x, y);
     }
   }
   return getMoveSpaceActor(res, actors, i, move);
 }