예제 #1
0
 public static boolean isValidBuildTarget(
     BuildAction buildAction, WorldObject performer, WorldObject target, World world) {
   int x = (Integer) target.getProperty(Constants.X);
   int y = (Integer) target.getProperty(Constants.Y);
   return !target.hasProperty(Constants.ID)
       && GoalUtils.isOpenSpace(x, y, buildAction.getWidth(), buildAction.getHeight(), world);
 }
 @Override
 public boolean isValidTarget(WorldObject performer, WorldObject target, World world) {
   return target.hasProperty(Constants.SMITH_QUALITY);
 }
예제 #3
0
 private boolean nonMemberSoldItem(WorldObject organization, WorldObject w, List<Item> items) {
   return w.hasProperty(Constants.ITEMS_SOLD)
       && !w.getProperty(Constants.ITEMS_SOLD).isEmpty()
       && w.getProperty(Constants.ITEMS_SOLD).containsAny(items)
       && !w.getProperty(Constants.GROUP).contains(organization);
 }