From b2f8e36b52abc98fe6f06154a1dab6193daee7bb Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 14 May 2024 12:57:55 -0700 Subject: [PATCH] Randomize stats of Deathmatch & Adventure Island creatures --- .../stendhal/server/maps/deathmatch/CreatureSpawner.java | 4 ++-- .../stendhal/server/maps/magic/house1/AdventureIsland.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/games/stendhal/server/maps/deathmatch/CreatureSpawner.java b/src/games/stendhal/server/maps/deathmatch/CreatureSpawner.java index d0f3c02f8a6..96001810a56 100644 --- a/src/games/stendhal/server/maps/deathmatch/CreatureSpawner.java +++ b/src/games/stendhal/server/maps/deathmatch/CreatureSpawner.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -163,7 +163,7 @@ public Creature calculateNextCreature(final int questLevel) { */ DeathMatchCreature spawnNewCreature(final Creature template, final Player player, final DeathmatchInfo deathmatchInfo) { DeathMatchCreature creature = new DeathMatchCreature( - new ArenaCreature(template.getNewInstance(), deathmatchInfo.getArena().getShape()), deathmatchInfo); + new ArenaCreature(template.getNewInstanceRandomizeStats(), deathmatchInfo.getArena().getShape()), deathmatchInfo); if (StendhalRPAction.placeat(deathmatchInfo.getZone(), creature, player.getX(), player.getY(), deathmatchInfo.getArena().getShape())) { creature.clearDropItemList(); diff --git a/src/games/stendhal/server/maps/magic/house1/AdventureIsland.java b/src/games/stendhal/server/maps/magic/house1/AdventureIsland.java index 3bdd26128d9..c6ae5a65bf5 100644 --- a/src/games/stendhal/server/maps/magic/house1/AdventureIsland.java +++ b/src/games/stendhal/server/maps/magic/house1/AdventureIsland.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -89,6 +89,8 @@ private void init(final Player player) { creature = new Creature(creatureSpawner.calculateNextCreature(level)); } + // randomize stats + creature = creature.getNewInstanceRandomizeStats(); if (StendhalRPAction.placeat(this, creature, Rand.randUniform(MIN_X, MAX_X), Rand.randUniform(MIN_Y, MAX_Y))) { numCreatures++;