Examples of calculateNextCreature()


Examples of games.stendhal.server.maps.deathmatch.CreatureSpawner.calculateNextCreature()

    int count = 0;
    // max ALLOWED_FAILS fails to place all creatures before we give up
    while (numCreatures < NUMBER_OF_CREATURES && count < ALLOWED_FAILS) {
      int level = Rand.randUniform((int) (player.getLevel() * LEVEL_RATIO), player.getLevel());
      CreatureSpawner creatureSpawner = new CreatureSpawner();
      Creature creature = new Creature(creatureSpawner.calculateNextCreature(level));
        if (StendhalRPAction.placeat(this, creature, Rand.randUniform(MIN_X, MAX_X), Rand.randUniform(MIN_Y, MAX_Y))) {
          numCreatures++;
        } else {
          logger.info(" could not add a creature to adventure island: " + creature);
          count++;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.