Package games.stendhal.server.entity.creature

Examples of games.stendhal.server.entity.creature.DeathMatchCreature


    // spawn new monster, with the spawn delay proportional to player level
    // and inversely proportional to the number of players in the ring
    // and always spawning if there is no creature
    // for level 20 players it is always just 20 seconds
    if (((new Date()).getTime() - deathmatchState.getStateTime() > (300*(player.getLevel()-20)/(1+numberPlayers) + CreatureSpawner.SPAWN_DELAY)) || spawner.areAllCreaturesDead()) {
      final DeathMatchCreature mycreature = spawner.spawnNewCreature(
          deathmatchState.getQuestLevel(), player, dmInfo);
      // in case there is not enough space to place the creature,
      // mycreature is null
      if (mycreature != null) {

View Full Code Here


   * @param player the player who takes the deatchmatch
   * @param deathmatchInfo the deatchmatch's info
   * @return Creature or <code>null</code> in case it cannot be created
   */
  DeathMatchCreature spawnNewCreature(final Creature template, final Player player, final DeathmatchInfo deathmatchInfo) {
    DeathMatchCreature creature = new DeathMatchCreature(
            new ArenaCreature(template.getNewInstance(), deathmatchInfo.getArena().getShape()));

    if (StendhalRPAction.placeat(deathmatchInfo.getZone(), creature, player.getX(), player.getY(), deathmatchInfo.getArena().getShape())) {
      creature.clearDropItemList();
      creature.setTarget(player);
      creature.setPlayerToReward(player);

      spawnedCreatures.add(creature);
    } else {
      logger.info(" could not add a creature: " + creature);
      creature = null;
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.creature.DeathMatchCreature

Copyright © 2018 www.massapicom. 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.