From 56a904b4c851915c79abfb86b1d9ed8903cc19f4 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 19:47:56 -0700 Subject: [PATCH 01/11] Action to store player's level in a quest slot --- .../npc/action/RecordPlayerLevelAction.java | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/games/stendhal/server/entity/npc/action/RecordPlayerLevelAction.java diff --git a/src/games/stendhal/server/entity/npc/action/RecordPlayerLevelAction.java b/src/games/stendhal/server/entity/npc/action/RecordPlayerLevelAction.java new file mode 100644 index 00000000000..273fcf27d34 --- /dev/null +++ b/src/games/stendhal/server/entity/npc/action/RecordPlayerLevelAction.java @@ -0,0 +1,90 @@ +/*************************************************************************** + * Copyright © 2024 - Faiumoni e. V. * + *************************************************************************** + *************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +package games.stendhal.server.entity.npc.action; + +import static com.google.common.base.Preconditions.checkNotNull; + +import games.stendhal.common.parser.Sentence; +import games.stendhal.server.entity.npc.ChatAction; +import games.stendhal.server.entity.npc.EventRaiser; +import games.stendhal.server.entity.player.Player; + + +/** + * Action to store player's level in a quest slot. + */ +public class RecordPlayerLevelAction implements ChatAction { + + /** Quest string identifier. */ + private final String questSlot; + /** Slot index at which player level is stored. */ + private Integer index; + + + /** + * Creates a new RecordPlayerLevelAction. + * + * @param questSlot + * Quest string identifier. + */ + public RecordPlayerLevelAction(final String questSlot) { + this.questSlot = checkNotNull(questSlot); + } + + /** + * Creates a new RecordPlayerLevelAction. + * + * @param questSlot + * Quest string identifier. + * @param index + * Slot index at which player level is stored. + */ + public RecordPlayerLevelAction(final String questSlot, final int index) { + this.questSlot = checkNotNull(questSlot); + this.index = index; + } + + @Override + public void fire(final Player player, final Sentence sentence, final EventRaiser npc) { + if (index != null) { + player.setQuest(questSlot, index, String.valueOf(player.getLevel())); + return; + } + player.setQuest(questSlot, String.valueOf(player.getLevel())); + } + + @Override + public String toString() { + String value = RecordPlayerLevelAction.class.getSimpleName() + "(" + questSlot; + if (index != null) { + value += ", " + index; + } + return value + ")"; + } + + @Override + public int hashCode() { + int hash = 5009; + hash = 5011 * hash + questSlot.hashCode(); + hash = 5021 * hash + (index != null ? index : 0); + return hash; + } + + @Override + public boolean equals(final Object obj) { + if (!(obj instanceof RecordPlayerLevelAction)) { + return false; + } + final RecordPlayerLevelAction other = (RecordPlayerLevelAction) obj; + return this.questSlot.equals(other.questSlot) && this.index == other.index; + } +} From ff0b7de48300018c11893675582cc6a58b03b05e Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 23:51:14 -0700 Subject: [PATCH 02/11] Method to get player level at most recent quest completion --- .../server/maps/quests/AbstractQuest.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/games/stendhal/server/maps/quests/AbstractQuest.java b/src/games/stendhal/server/maps/quests/AbstractQuest.java index e60dd0f2b73..b0337bf4e51 100644 --- a/src/games/stendhal/server/maps/quests/AbstractQuest.java +++ b/src/games/stendhal/server/maps/quests/AbstractQuest.java @@ -15,6 +15,8 @@ import java.util.ArrayList; import java.util.List; +import org.apache.log4j.Logger; + import games.stendhal.common.MathHelper; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.npc.NPCList; @@ -167,6 +169,36 @@ public int getCompletedCount(final Player player) { return completed ? 1 : 0; } + /** + * Can be used to determine at what level the player most recently completed the quest. + * + * Returns 0 unless overridden in quest code. + * + * @param index + * Slot index where player level is stored. + * @param player + * Player in question. + * @return + * Player's level at time of completion or -1 if never completed. + */ + protected int getLevelAtLastCompletion(final int index, final Player player) { + final String questSlot = getSlotName(); + if (!player.hasQuest(questSlot)) { + return -1; + } + final String stateValue = player.getQuest(questSlot, index); + try { + return Integer.parseInt(stateValue); + } catch (final NumberFormatException e) { + Logger.getLogger(AbstractQuest.class).debug("State of quest " + questSlot + + " not integer value at index " + index + " (\"" + stateValue + "\") for player " + + player.getName()); + } + // if quest was completed assume at least level 0 + // NOTE: should we assume player's current level? + return 0; + } + @Override public boolean isRepeatable(final Player player) { // TODO implement From 30c56f31da1ac5217f18aba643f4ba78139f7cd3 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Wed, 17 Apr 2024 03:33:11 -0700 Subject: [PATCH 03/11] Record player level when completing Kirdneh Museum quest --- .../stendhal/server/maps/quests/WeeklyItemQuest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java index 2a008b6c949..ea04ce992ff 100644 --- a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java +++ b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java @@ -36,6 +36,7 @@ import games.stendhal.server.entity.npc.action.IncreaseXPDependentOnLevelAction; import games.stendhal.server.entity.npc.action.IncrementQuestAction; import games.stendhal.server.entity.npc.action.MultipleActions; +import games.stendhal.server.entity.npc.action.RecordPlayerLevelAction; import games.stendhal.server.entity.npc.action.SayRequiredItemAction; import games.stendhal.server.entity.npc.action.SayTimeRemainingAction; import games.stendhal.server.entity.npc.action.SetQuestAction; @@ -94,6 +95,9 @@ public class WeeklyItemQuest extends AbstractQuest { /** How often the quest may be repeated */ private static final int delay = TimeUtil.MINUTES_IN_WEEK; + /** Slot index where player's level is stored upon completion. */ + private static final int SLOT_INDEX_LEVEL = 3; + /** * All items which are hard enough to find but not tooo hard and not in Daily quest. If you want to do * it better, go ahead. * @@ -411,9 +415,11 @@ private void completeQuest() { final List actions = new LinkedList(); actions.add(new DropRecordedItemAction(QUEST_SLOT,0)); - actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1)); - actions.add(new IncrementQuestAction(QUEST_SLOT,2,1)); actions.add(new SetQuestAction(QUEST_SLOT, 0, "done")); + actions.add(new SetQuestToTimeStampAction(QUEST_SLOT, 1)); + actions.add(new IncrementQuestAction(QUEST_SLOT, questInfo.getCompletionsIndexes().second(), 1)); + // NOTE: store player level before XP is added + actions.add(new RecordPlayerLevelAction(QUEST_SLOT, WeeklyItemQuest.SLOT_INDEX_LEVEL)); actions.add(new IncreaseXPDependentOnLevelAction(5.0/3.0, 290.0)); actions.add(new IncreaseKarmaAction(10.0)); actions.add(new ChatAction() { From 43d0f355e75c77f8a216e1caab7ffbf7f4a5ba09 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 17:05:25 -0700 Subject: [PATCH 04/11] Static attribute for max attainable level --- src/games/stendhal/common/Level.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/games/stendhal/common/Level.java b/src/games/stendhal/common/Level.java index e7e770f86ef..a2f92fc6b87 100644 --- a/src/games/stendhal/common/Level.java +++ b/src/games/stendhal/common/Level.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003 - Marauroa * + * (C) Copyright 2003-2024 - Marauroa * *************************************************************************** *************************************************************************** * * @@ -24,6 +24,8 @@ public class Level { // Max Level is LEVELS - 1. // xp formula overflows for level = 599. public static final int LEVELS = 598; + /** Maximum level which players can attain (597). */ + public static final int MAX = Level.LEVELS-1; private static int[] xp; From 1ce6fb4e98b08fb2fcc8a241773c43f5a07c5dd1 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 17:08:30 -0700 Subject: [PATCH 05/11] Enumeration to group players by level. --- .../server/entity/player/PlayerTier.java | 85 +++++++++++++++++++ .../server/maps/quests/WeeklyItemQuest.java | 20 ++--- 2 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 src/games/stendhal/server/entity/player/PlayerTier.java diff --git a/src/games/stendhal/server/entity/player/PlayerTier.java b/src/games/stendhal/server/entity/player/PlayerTier.java new file mode 100644 index 00000000000..4f95a12612f --- /dev/null +++ b/src/games/stendhal/server/entity/player/PlayerTier.java @@ -0,0 +1,85 @@ +/*************************************************************************** + * Copyright © 2024 - Faiumoni e. V. * + *************************************************************************** + *************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +package games.stendhal.server.entity.player; + +import games.stendhal.common.Level; + + +/** + * Player grouping by level. + */ +public enum PlayerTier { + + /** Dummy group. */ + UNKNOWN(0, 0, 0), + /** Group of players ranging from levels 0 to 50. */ + BEGINNER(0, 50, 1), + /** Group of players ranging from levels 51 to 150. */ + NOVICE(51, 150, 1.25), + /** Group of players ranging from levels 151 to 450. */ + VETERAN(151, 450, 1.5), + /** Group of players ranging from levels 451 to max level (597). */ + EXPERT(451, Level.MAX, 2); + + /** Minimum level in this tier group. */ + public final int minLevel; + /** Maximum level in this tier group (-1 represents current max level limit). */ + public final int maxLevel; + /** Scoring value multiplier. */ + public final double multiplier; + + + /** + * Creates a new player tier group. + * + * @param minLevel + * Minimum level in this tier group. + * @param maxLevel + * Maximum level in this tier group. + * @param multiplier + * Scoring value multiplier. + */ + private PlayerTier(final int minLevel, final int maxLevel, final double multiplier) { + this.minLevel = minLevel; + this.maxLevel = maxLevel; + this.multiplier = multiplier; + } + + /** + * Retrieves tier group to which a player belongs. + * + * @param playerLevel + * Level of player in question. + * @return + * Tier group based on player's level. + */ + public static PlayerTier getTier(final int playerLevel) { + for (final PlayerTier tier: PlayerTier.values()) { + if (playerLevel >= tier.minLevel && playerLevel <= tier.maxLevel) { + return tier; + } + } + return PlayerTier.UNKNOWN; + } + + /** + * Retrieves tier group to which a player belongs. + * + * @param player + * Player in question. + * @return + * Tier group based on player's level. + */ + public static PlayerTier getTier(final Player player) { + return PlayerTier.getTier(player.getLevel()); + } +} diff --git a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java index ea04ce992ff..6ce484174e2 100644 --- a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java +++ b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java @@ -54,6 +54,7 @@ import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition; import games.stendhal.server.entity.npc.condition.TimePassedCondition; import games.stendhal.server.entity.player.Player; +import games.stendhal.server.entity.player.PlayerTier; import games.stendhal.server.maps.Region; import games.stendhal.server.util.TimeUtil; @@ -106,9 +107,6 @@ public class WeeklyItemQuest extends AbstractQuest { private static final Map items_med = new HashMap(); private static final Map items_hard = new HashMap(); - private static final int LEVEL_MED = 51; - private static final int LEVEL_HARD = 151; - /** * Get the static instance. @@ -326,7 +324,7 @@ private void getQuest() { final SpeakerNPC npc = npcs.get("Hazel"); final ChatCondition startEasyCondition = new AndCondition( - new LevelLessThanCondition(LEVEL_MED), + new LevelLessThanCondition(PlayerTier.NOVICE.minLevel), new OrCondition( new QuestNotStartedCondition(QUEST_SLOT), new AndCondition( @@ -334,8 +332,8 @@ private void getQuest() { new TimePassedCondition(QUEST_SLOT,1,delay)))); final ChatCondition startMedCondition = new AndCondition( - new LevelGreaterThanCondition(LEVEL_MED - 1), - new LevelLessThanCondition(LEVEL_HARD), + new LevelGreaterThanCondition(PlayerTier.BEGINNER.maxLevel), + new LevelLessThanCondition(PlayerTier.VETERAN.minLevel), new OrCondition( new QuestNotStartedCondition(QUEST_SLOT), new AndCondition( @@ -343,7 +341,7 @@ private void getQuest() { new TimePassedCondition(QUEST_SLOT,1,delay)))); final ChatCondition startHardCondition = new AndCondition( - new LevelGreaterThanCondition(LEVEL_HARD - 1), + new LevelGreaterThanCondition(PlayerTier.NOVICE.maxLevel), new OrCondition( new QuestNotStartedCondition(QUEST_SLOT), new AndCondition( @@ -458,18 +456,18 @@ private void abortQuest() { final SpeakerNPC npc = npcs.get("Hazel"); final ChatCondition startEasyCondition = new AndCondition( - new LevelLessThanCondition(LEVEL_MED), + new LevelLessThanCondition(PlayerTier.NOVICE.minLevel), new QuestActiveCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,1,expireDelay)); final ChatCondition startMedCondition = new AndCondition( - new LevelGreaterThanCondition(LEVEL_MED - 1), - new LevelLessThanCondition(LEVEL_HARD), + new LevelGreaterThanCondition(PlayerTier.BEGINNER.maxLevel), + new LevelLessThanCondition(PlayerTier.VETERAN.minLevel), new QuestActiveCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,1,expireDelay)); final ChatCondition startHardCondition = new AndCondition( - new LevelGreaterThanCondition(LEVEL_HARD - 1), + new LevelGreaterThanCondition(PlayerTier.NOVICE.maxLevel), new QuestActiveCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT,1,expireDelay)); From 7fc9bde324ca044af1d7c8d7bac72c19d3df437f Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 23:42:40 -0700 Subject: [PATCH 06/11] Class for managing Hall of Fame scoring --- .../server/core/engine/db/AchievementDAO.java | 13 +++--- .../stendhal/server/core/rp/HOFScore.java | 44 +++++++++++++++++++ .../core/rp/achievement/Achievement.java | 41 +++++++++-------- .../factory/AbstractAchievementFactory.java | 3 +- .../AdosItemQuestAchievementsFactory.java | 15 ++++--- .../factory/CommerceAchievementFactory.java | 7 +-- .../factory/DeathmatchAchievementFactory.java | 17 +++---- .../factory/ExperienceAchievementFactory.java | 19 ++++---- .../factory/FightingAchievementFactory.java | 41 ++++++++--------- .../factory/FriendAchievementFactory.java | 11 ++--- .../InteriorZoneAchievementFactory.java | 15 ++++--- .../factory/ItemAchievementFactory.java | 39 ++++++++-------- .../KillBlordroughsAchievementFactory.java | 13 +++--- .../KirdnehItemAchievementFactory.java | 13 +++--- ...hrilbourghEnemyArmyAchievementFactory.java | 13 +++--- .../factory/ObtainAchievementsFactory.java | 17 +++---- .../OutsideZoneAchievementFactory.java | 21 ++++----- .../factory/ProductionAchievementFactory.java | 13 +++--- .../factory/QuestAchievementFactory.java | 21 ++++----- .../SemosMonsterQuestAchievementFactory.java | 15 ++++--- .../UndergroundZoneAchievementFactory.java | 15 ++++--- 21 files changed, 237 insertions(+), 169 deletions(-) create mode 100644 src/games/stendhal/server/core/rp/HOFScore.java diff --git a/src/games/stendhal/server/core/engine/db/AchievementDAO.java b/src/games/stendhal/server/core/engine/db/AchievementDAO.java index b9546c875ca..e2d39abe3ae 100644 --- a/src/games/stendhal/server/core/engine/db/AchievementDAO.java +++ b/src/games/stendhal/server/core/engine/db/AchievementDAO.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2020 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -22,14 +22,15 @@ import games.stendhal.server.core.rp.achievement.Achievement; import marauroa.server.db.DBTransaction; import marauroa.server.db.TransactionPool; + + /** - * DAO to handle achievements for the stendhal website - * @author madmetzger + * DAO to handle achievements for the Stendhal website. * + * @author madmetzger */ public class AchievementDAO { - /** * logs a reached achievement into the database * @@ -87,7 +88,7 @@ public int insertAchievement(DBTransaction transaction, Achievement achievement) parameters.put("title", achievement.getTitle()); parameters.put("category", achievement.getCategory().toString()); parameters.put("description", achievement.getDescription()); - parameters.put("base_score", achievement.getBaseScore()); + parameters.put("base_score", achievement.getBaseScoreValue()); parameters.put("active", achievement.isActive() ? 1 : 0); transaction.execute(query, parameters); achievementId = transaction.getLastInsertId("achievement", "id"); @@ -129,7 +130,7 @@ public void updateAchievement(DBTransaction transaction, Integer id, Achievement parameters.put("title", achievement.getTitle()); parameters.put("category", achievement.getCategory().toString()); parameters.put("description", achievement.getDescription()); - parameters.put("base_score", achievement.getBaseScore()); + parameters.put("base_score", achievement.getBaseScoreValue()); parameters.put("active", achievement.isActive() ? 1 : 0); parameters.put("id", id); transaction.execute(query, parameters); diff --git a/src/games/stendhal/server/core/rp/HOFScore.java b/src/games/stendhal/server/core/rp/HOFScore.java new file mode 100644 index 00000000000..c8c447d6849 --- /dev/null +++ b/src/games/stendhal/server/core/rp/HOFScore.java @@ -0,0 +1,44 @@ +/*************************************************************************** + * Copyright © 2024 - Faiumoni e. V. * + *************************************************************************** + *************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +package games.stendhal.server.core.rp; + + +/** + * Scoring values for Hall of Fame. + */ +public class HOFScore { + + /** Standard score awarding no points. */ + public static final HOFScore NONE = new HOFScore(0); + /** Standard score awarding 1 point. */ + public static final HOFScore EASY = new HOFScore(1); + /** Standard score awarding 2 points. */ + public static final HOFScore MEDIUM = new HOFScore(2); + /** Standard score awarding 5 points. */ + public static final HOFScore HARD = new HOFScore(5); + /** Standard score awarding 7 points. */ + public static final HOFScore EXTREME = new HOFScore(7); + + /** Points value of this scoring tier. */ + public final int value; + + + /** + * Creates a new Hall of Fame score. + * + * @param value + * Points value of this scoring tier. + */ + public HOFScore(final int value) { + this.value = value; + } +} diff --git a/src/games/stendhal/server/core/rp/achievement/Achievement.java b/src/games/stendhal/server/core/rp/achievement/Achievement.java index b0b1b37df53..1f7f053a364 100644 --- a/src/games/stendhal/server/core/rp/achievement/Achievement.java +++ b/src/games/stendhal/server/core/rp/achievement/Achievement.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -12,28 +12,20 @@ ***************************************************************************/ package games.stendhal.server.core.rp.achievement; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatCondition; import games.stendhal.server.entity.player.Player; + + /** * An Achievement a player can reach while playing the game. + * * Achievements are given for example for doing a certain number of quests or killing a number of special creatures * * @author madmetzger */ public class Achievement { - /** base score for easy achievements */ - public static final int EASY_BASE_SCORE = 1; - - /** base score for achievements of medium difficulty */ - public static final int MEDIUM_BASE_SCORE = 2; - - /** base score for difficult achievements */ - public static final int HARD_BASE_SCORE = 5; - - /** base score for extreme achievement */ - public static final int EXTREME_BASE_SCORE = 7; - private final String identifier; private final String title; @@ -42,7 +34,7 @@ public class Achievement { private final String description; - private final int baseScore; + private final HOFScore baseScore; /** is this achievement visible? */ private final boolean active; @@ -50,7 +42,6 @@ public class Achievement { private final ChatCondition condition; - /** * create a new achievement * @@ -62,7 +53,7 @@ public class Achievement { * @param active * @param condition */ - public Achievement(String identifier, String title, Category category, String description, int baseScore, boolean active, ChatCondition condition) { + public Achievement(String identifier, String title, Category category, String description, HOFScore baseScore, boolean active, ChatCondition condition) { this.identifier = identifier; this.title = title; this.category = category; @@ -101,12 +92,25 @@ public String getDescription() { } /** - * @return the base score for this achievement + * Retrieves base score of this achievement. + * + * @return + * Achievement base score. */ - public int getBaseScore() { + public HOFScore getBaseScore() { return this.baseScore; } + /** + * Retrieves base score of this achievement. + * + * @return + * Achievement base score integer value. + */ + public int getBaseScoreValue() { + return this.baseScore.value; + } + /** * @return true if the achievement is visible, false otherwise */ @@ -116,6 +120,7 @@ public boolean isActive() { /** * Check if a player has fulfilled this achievement + * * @param p the player to check * @return true iff this achievement's condition evaluates to true */ diff --git a/src/games/stendhal/server/core/rp/achievement/factory/AbstractAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/AbstractAchievementFactory.java index c5486b43f2e..d384ee7957b 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/AbstractAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/AbstractAchievementFactory.java @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.ChatCondition; @@ -50,7 +51,7 @@ public abstract class AbstractAchievementFactory { * @param condition * @return the new Achievement */ - protected Achievement createAchievement(String identifier, String title, String description, int score, boolean active, ChatCondition condition) { + protected Achievement createAchievement(String identifier, String title, String description, HOFScore score, boolean active, ChatCondition condition) { return new Achievement(identifier, title, getCategory(), description, score, active, condition); } diff --git a/src/games/stendhal/server/core/rp/achievement/factory/AdosItemQuestAchievementsFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/AdosItemQuestAchievementsFactory.java index 8f615bb6bc7..bd4d18e6eb3 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/AdosItemQuestAchievementsFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/AdosItemQuestAchievementsFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.QuestStateGreaterThanCondition; @@ -46,37 +47,37 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_SUPPORTER, "Ados's Supporter", "Finish daily item quest 10 times", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("daily_item", 2, 9))); achievements.add(createAchievement( ID_PROVIDER, "Ados's Provider", "Finish daily item quest 50 times", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("daily_item", 2, 49))); achievements.add(createAchievement( ID_SUPPLIER, "Ados's Supplier", "Finish daily item quest 100 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("daily_item", 2, 99))); achievements.add(createAchievement( ID_STOCKPILER, "Ados's Stockpiler", "Finish daily item quest 250 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("daily_item", 2, 249))); achievements.add(createAchievement( ID_HOARDER, "Ados's Hoarder", "Finish daily item quest 500 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("daily_item", 2, 499))); achievements.add(createAchievement( ID_LIFEBLOOD, "Ados's Lifeblood", "Finish daily item quest 1,000 times", - Achievement.EXTREME_BASE_SCORE, true, + HOFScore.EXTREME, true, new QuestStateGreaterThanCondition("daily_item", 2, 999))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/CommerceAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/CommerceAchievementFactory.java index 518ee45a893..f0979ce59c0 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/CommerceAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/CommerceAchievementFactory.java @@ -21,6 +21,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.core.rp.achievement.condition.BoughtNumberOfCondition; @@ -106,19 +107,19 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_HAPPY_HOUR, "It's Happy Hour Somewhere", "Purchase 100 bottles of beer & 100 glasses of wine", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new BoughtNumberOfCondition(100, Arrays.asList("beer", "wine")))); achievements.add(createAchievement( ID_SELL_20K, "Traveling Peddler", "Make 20000 money in sales to NPCs", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new HasEarnedTotalMoneyCondition(20000))); achievements.add(createAchievement( ID_BUY_ALL, "Community Supporter", "Spend money around the world", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new HasSpentMoneyCondition(TRADE_ALL_AMOUNTS))); diff --git a/src/games/stendhal/server/core/rp/achievement/factory/DeathmatchAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/DeathmatchAchievementFactory.java index d9075bd0f22..30a12510195 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/DeathmatchAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/DeathmatchAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright © 2003-2023 - Arianne * + * Copyright © 2003-2024 - Arianne * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import games.stendhal.common.MathHelper; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.Entity; @@ -58,45 +59,45 @@ public Collection createAchievements() { achievements.add(createAchievement( "quest.special.dm.025", "Gladiator", "Fight 25 Deathmatches", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("deathmatch", 1, 24))); */ achievements.add(createAchievement( "quest.deathmatch", "Deathmatch Hero", "Earn 100,000 points in deathmatch", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition( "deathmatch_score", 0, 100000))); achievements.add(createAchievement( ID_HELPER_25, "Deathmatch Helper", "Aid other players in 25 rounds of deathmatch", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new HasHelpedNumberOfTimes(25))); achievements.add(createAchievement( ID_HELPER_50, "Deathmatch Companion", "Aid other players in 50 rounds of deathmatch", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new HasHelpedNumberOfTimes(50))); achievements.add(createAchievement( ID_HELPER_100, "Deathmatch Convoy", "Aid other players in 100 rounds of deathmatch", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new HasHelpedNumberOfTimes(100))); achievements.add(createAchievement( ID_SOLO_5, "Challenge Accepted", "Complete 5 rounds of deathmatch without help", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new HasSoloedNumberOfTimes(5))); achievements.add(createAchievement( ID_HELM_MAX, "Determination", "Increase trophy helmet to max defense", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new ChatCondition() { @Override public boolean fire(final Player player, final Sentence sentence, final Entity npc) { diff --git a/src/games/stendhal/server/core/rp/achievement/factory/ExperienceAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/ExperienceAchievementFactory.java index c539cd3caa2..d49edbe5d48 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/ExperienceAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/ExperienceAchievementFactory.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2022 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -15,6 +15,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.LevelGreaterThanCondition; @@ -49,49 +50,49 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_GREENHORN, "Greenhorn", "Reach level 10", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new LevelGreaterThanCondition(9))); achievements.add(createAchievement( ID_NOVICE, "Novice", "Reach level 50", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new LevelGreaterThanCondition(49))); achievements.add(createAchievement( ID_APPRENTICE, "Apprentice", "Reach level 100", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new LevelGreaterThanCondition(99))); achievements.add(createAchievement( ID_ADVENTURER, "Adventurer", "Reach level 200", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new LevelGreaterThanCondition(199))); achievements.add(createAchievement( ID_EXPERIENCED_ADV, "Experienced Adventurer", "Reach level 300", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new LevelGreaterThanCondition(299))); achievements.add(createAchievement( ID_MASTER_ADV, "Master Adventurer", "Reach level 400", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new LevelGreaterThanCondition(399))); achievements.add(createAchievement( ID_MASTER, "Stendhal Master", "Reach level 500", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new LevelGreaterThanCondition(499))); achievements.add(createAchievement( ID_HIGH_MASTER, "Stendhal High Master", "Reach level 597", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new LevelGreaterThanCondition(596))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/FightingAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/FightingAchievementFactory.java index d71c63dcdda..f5c3182c13e 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/FightingAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/FightingAchievementFactory.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2022 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.constants.KillType; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.core.rp.achievement.condition.KilledRareCreatureCondition; @@ -116,43 +117,43 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_RATS, "Rat Hunter", "Kill 15 rats", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition("rat", 15))); achievements.add(createAchievement( ID_EXTERMINATOR, "Exterminator", "Kill 10 rats of each kind", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(10, ENEMIES_EXTERMINATOR))); achievements.add(createAchievement( ID_DEER, "Deer Hunter", "Kill 25 deer", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition("deer", 25))); achievements.add(createAchievement( ID_BOARS, "Boar Hunter", "Kill 20 boar", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition("boar", 20))); achievements.add(createAchievement( ID_BEARS, "Bear Hunter", "Kill 10 black bears, 10 bears and 10 babybears", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition(10, ENEMIES_BEARS))); achievements.add(createAchievement( ID_FOXES, "Fox Hunter", "Kill 20 foxes", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition("fox", 20))); achievements.add(createAchievement( ID_SAFARI, "Safari", "Kill 30 tigers, 30 lions and 50 elephants", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new AndCondition( new PlayerHasKilledNumberOfCreaturesCondition("tiger", 30), new PlayerHasKilledNumberOfCreaturesCondition("lion", 30), @@ -161,49 +162,49 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_ENTS, "Wood Cutter", "Kill 10 ents, 10 entwives and 10 old ents", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(10, "ent", "entwife", "old ent"))); achievements.add(createAchievement( ID_POACHER, "Poacher", "Kill any rare creature", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new KilledRareCreatureCondition())); achievements.add(createAchievement( ID_LEGEND, "Legend", "Kill all creatures solo", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new KilledSoloAllCreaturesCondition())); achievements.add(createAchievement( ID_TEAM_PLAYER, "Team Player", "Kill all creatures in a team", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new KilledSharedAllCreaturesCondition())); achievements.add(createAchievement( ID_GIANTS, "David vs. Goliath", "Kill 20 of each type of giant solo", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(20, KillType.SOLO, ENEMIES_GIANTS))); achievements.add(createAchievement( ID_ANGELS, "Heavenly Wrath", "Kill 100 of each type of angel", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerHasKilledNumberOfCreaturesCondition(100, ENEMIES_ANGELS))); achievements.add(createAchievement( ID_WEREWOLF, "Silver Bullet", "Kill 500 werewolves", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(500, "werewolf"))); achievements.add(createAchievement( ID_MERMAIDS, "Serenade the Siren", "Kill 10,000 gem mermaids", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new ChatCondition() { @Override public boolean fire(final Player player, final Sentence sentence, final Entity npc) { @@ -219,13 +220,13 @@ public boolean fire(final Player player, final Sentence sentence, final Entity n achievements.add(createAchievement( ID_DEEPSEA, "Deep Sea Fisherman", "Kill 500 sharks, 500 kraken and 500 neo kraken", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(500, ENEMIES_DEEPSEA))); achievements.add(createAchievement( ID_ZOMBIES, "Zombie Apocalypse", "Kill 500 zombies", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new ChatCondition() { @Override public boolean fire(Player player, Sentence sentence, Entity npc) { @@ -241,13 +242,13 @@ public boolean fire(Player player, Sentence sentence, Entity npc) { achievements.add(createAchievement( ID_FOWL, "Chicken Nuggets", "Kill 100 of each type of fowl", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasKilledNumberOfCreaturesCondition(100, ENEMIES_FOWL))); achievements.add(createAchievement( ID_PACHYDERM, "Pachyderm Mayhem", "Kill 100 of each type of pachyderm", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasKilledNumberOfCreaturesCondition(100, ENEMIES_PACHYDERM))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/FriendAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/FriendAchievementFactory.java index 499bfa559f0..568876aca28 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/FriendAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/FriendAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -15,6 +15,7 @@ import java.util.LinkedList; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.core.rp.achievement.condition.QuestWithPrefixCompletedCondition; @@ -56,7 +57,7 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_CHILD_FRIEND, "Childrens' Friend", "Complete quests for all children", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new AndCondition( // Susi Quest is never set to done, therefore we check just if the quest has been started (condition "anyFriends" from FoundGirl.java) new QuestStartedCondition("susi"), @@ -88,7 +89,7 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_PRIVATE_DETECTIVE, "Private Detective", "Find all lost and hidden people", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new AndCondition( // Rat Children (Agnus) new QuestCompletedCondition("find_rat_kids"), @@ -117,7 +118,7 @@ public boolean fire(final Player player, final Sentence sentence, final Entity e achievements.add(createAchievement( ID_GOOD_SAMARITAN, "Good Samaritan", "Earn a very good karma", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new ChatCondition() { @Override public boolean fire(final Player player, final Sentence sentence, final Entity entity) { @@ -129,7 +130,7 @@ public boolean fire(final Player player, final Sentence sentence, final Entity e achievements.add(createAchievement( ID_STILL_BELIEVING, "Still Believing", "Meet Santa Claus and Easter Bunny", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new AndCondition( new QuestWithPrefixCompletedCondition("meet_santa_"), new QuestWithPrefixCompletedCondition("meet_bunny_")))); diff --git a/src/games/stendhal/server/core/rp/achievement/factory/InteriorZoneAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/InteriorZoneAchievementFactory.java index 87e861ae30b..d8838e30808 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/InteriorZoneAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/InteriorZoneAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2022 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.PlayerVisitedZonesInRegionCondition; @@ -38,37 +39,37 @@ public Collection createAchievements() { achievements.add(createAchievement( "zone.interior.semos", "Home Maker", "Visit all interior zones in the Semos region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("semos", Boolean.FALSE, Boolean.FALSE))); achievements.add(createAchievement( "zone.interior.nalwor", "Elf Visitor", "Visit all interior zones in the Nalwor region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("nalwor", Boolean.FALSE, Boolean.FALSE))); achievements.add(createAchievement( "zone.interior.ados", "Up Town Guy", "Visit all accessible interior zones in the Ados region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("ados", Boolean.FALSE, Boolean.FALSE))); achievements.add(createAchievement( "zone.interior.wofolcity", "Kobold City", "Visit all interior zones in Wo'fol", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("wofol city", Boolean.FALSE, Boolean.FALSE))); achievements.add(createAchievement( "zone.interior.magiccity", "Magic City", "Visit all interior zones in the underground Magic city", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("magic city", Boolean.FALSE, Boolean.FALSE))); achievements.add(createAchievement( "zone.interior.deniran", "Country Recluse", "Visit all interior zones in the Deniran region", - Achievement.EASY_BASE_SCORE, false, + HOFScore.EASY, false, new PlayerVisitedZonesInRegionCondition("deniran", false, false))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/ItemAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/ItemAchievementFactory.java index 0d5610c1d5f..506b8a45199 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/ItemAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/ItemAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2022 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.PlayerLootedNumberOfItemsCondition; @@ -42,31 +43,31 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.money.100", "First Pocket Money", "Loot 100 money", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerLootedNumberOfItemsCondition(100, "money"))); achievements.add(createAchievement( "item.money.10000", "Goldshower", "Loot 10,000 money", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerLootedNumberOfItemsCondition(10000, "money"))); achievements.add(createAchievement( "item.money.100000", "Moving up in the World", "Loot 100,000 money", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerLootedNumberOfItemsCondition(100000, "money"))); achievements.add(createAchievement( "item.money.1000000", "You Don't Need it Anymore", "Loot 1,000,000 money", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerLootedNumberOfItemsCondition(1000000, "money"))); achievements.add(createAchievement( "item.set.red", "Amazon's Menace", "Loot a complete red equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "red armor", "red helmet", "red cloak", "red legs", "red boots", "red shield"))); @@ -74,7 +75,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.blue", "Feeling Blue", "Loot a complete blue equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "blue armor", "blue helmet", "blue striped cloak", "blue legs", "blue boots", "blue shield"))); @@ -82,7 +83,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.elvish", "Nalwor's Bane", "Loot a complete elvish equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "elvish armor", "elvish hat", "elvish cloak", "elvish legs", "elvish boots", "elvish shield"))); @@ -90,7 +91,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.shadow", "Shadow Dweller", "Loot a complete shadow equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "shadow armor", "shadow helmet", "shadow cloak", "shadow legs", "shadow boots", "shadow shield"))); @@ -98,7 +99,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.chaos", "Chaotic Looter", "Loot a complete chaos equipment set", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerLootedNumberOfItemsCondition(1, "chaos armor", "chaos helmet", "chaos cloak", "chaos legs", "chaos boots", "chaos shield"))); @@ -106,7 +107,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.golden", "Golden Boy", "Loot a complete golden equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "golden armor", "golden helmet", "golden cloak", "golden legs", "golden boots", "golden shield"))); @@ -114,7 +115,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.black", "Come to the Dark Side", "Loot a complete black equipment set", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerLootedNumberOfItemsCondition(1, "black armor", "black helmet", "black cloak", "black legs", "black boots", "black shield"))); @@ -122,7 +123,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.mainio", "Excellent Stuff", "Loot a complete mainio equipment set", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerLootedNumberOfItemsCondition(1, "mainio armor", "mainio helmet", "mainio cloak", "mainio legs", "mainio boots", "mainio shield"))); @@ -130,7 +131,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.set.xeno", "A Bit Xeno?", "Loot a complete xeno equipment set", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerLootedNumberOfItemsCondition(1, "xeno armor", "xeno helmet", "xeno cloak", "xeno legs", "xeno boots", "xeno shield"))); @@ -138,7 +139,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.cloak.dragon", "Dragon Slayer", "Loot all dragon cloaks", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "black dragon cloak", "blue dragon cloak", "bone dragon cloak", "green dragon cloak", "red dragon cloak"))); @@ -146,19 +147,19 @@ public Collection createAchievements() { achievements.add(createAchievement( "item.cheese.2000", "Cheese Wiz", "Loot 2,000 cheese", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerLootedNumberOfItemsCondition(2000, "cheese"))); achievements.add(createAchievement( "item.ham.2500", "Ham Hocks", "Loot 2,500 ham", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerLootedNumberOfItemsCondition(2500, "ham"))); achievements.add(createAchievement( ID_ROYAL, "Royally Endowed", "Loot a complete royal equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "royal armor", "royal helmet", "royal cloak", "royal legs", "royal boots", "royal shield"))); @@ -166,7 +167,7 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_MAGIC, "Magic Supplies", "Loot a complete magic equipment set", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerLootedNumberOfItemsCondition(1, "magic plate armor", "magic chain helmet", "magic cloak", "magic plate legs", "magic plate boots", "magic plate shield"))); diff --git a/src/games/stendhal/server/core/rp/achievement/factory/KillBlordroughsAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/KillBlordroughsAchievementFactory.java index b9c9a1e192b..f6ef01e2995 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/KillBlordroughsAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/KillBlordroughsAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -15,6 +15,7 @@ import java.util.LinkedList; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.Entity; @@ -56,31 +57,31 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_LACKEY, "Imperialist Lackey", "Finish Kill Blordroughs quest 5 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new CompletedCountCondition(COUNT_LACKEY))); achievements.add(createAchievement( ID_SOLDIER, "Imperialist Soldier", "Finish Kill Blordroughs quest 25 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new CompletedCountCondition(COUNT_SOLDIER))); achievements.add(createAchievement( ID_DOMINATOR, "Imperialist Dominator", "Finish Kill Blordroughs quest 50 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new CompletedCountCondition(COUNT_DOMINATOR))); achievements.add(createAchievement( ID_DICTATOR, "Imperialist Dictator", "Finish Kill Blordroughs quest 100 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new CompletedCountCondition(COUNT_DICTATOR))); achievements.add(createAchievement( ID_CRUSHER, "Nation Crusher", "Finish Kill Blordroughs quest 200 times", - Achievement.EXTREME_BASE_SCORE, true, + HOFScore.EXTREME, true, new CompletedCountCondition(COUNT_CRUSHER))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/KirdnehItemAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/KirdnehItemAchievementFactory.java index 0a0e55ecae5..1b93b78396f 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/KirdnehItemAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/KirdnehItemAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.QuestStateGreaterThanCondition; @@ -40,31 +41,31 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_ARCHAEOLOGIST, "Archaeologist", "Finish weekly item quest 5 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("weekly_item", 2, 4))); achievements.add(createAchievement( ID_DEDICATED, "Dedicated Archaeologist", "Finish weekly item quest 25 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("weekly_item", 2, 24))); achievements.add(createAchievement( ID_SENIOR, "Senior Archaeologist", "Finish weekly item quest 50 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("weekly_item", 2, 49))); achievements.add(createAchievement( ID_MASTER, "Master Archaeologist", "Finish weekly item quest 100 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("weekly_item", 2, 99))); achievements.add(createAchievement( ID_HYPERBOLIST, "Hyperbolist Historian", "Finish weekly item quest 200 times", - Achievement.EXTREME_BASE_SCORE, true, + HOFScore.EXTREME, true, new QuestStateGreaterThanCondition("weekly_item", 2, 199))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/MithrilbourghEnemyArmyAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/MithrilbourghEnemyArmyAchievementFactory.java index 83179db3f32..8e16c180914 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/MithrilbourghEnemyArmyAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/MithrilbourghEnemyArmyAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.QuestStateGreaterThanCondition; @@ -39,31 +40,31 @@ public Collection createAchievements() { achievements.add(createAchievement( "quest.special.kill_enemy_army.0005", "Sergeant", "Finish Kill Enemy Army quest 5 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("kill_enemy_army", IDX, 4))); achievements.add(createAchievement( "quest.special.kill_enemy_army.0025", "Major", "Finish Kill Enemy Army quest 25 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("kill_enemy_army", IDX, 24))); achievements.add(createAchievement( "quest.special.kill_enemy_army.0050", "Major General", "Finish Kill Enemy Army quest 50 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("kill_enemy_army", IDX, 49))); achievements.add(createAchievement( "quest.special.kill_enemy_army.0100", "Field Marshal", "Finish Kill Enemy Army quest 100 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("kill_enemy_army", IDX, 99))); achievements.add(createAchievement( "quest.special.kill_enemy_army.0200", "Commander in Chief", "Finish Kill Enemy Army quest 200 times", - Achievement.EXTREME_BASE_SCORE, true, + HOFScore.EXTREME, true, new QuestStateGreaterThanCondition("kill_enemy_army", IDX, 199))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/ObtainAchievementsFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/ObtainAchievementsFactory.java index 1a785e27da1..ad4a561953b 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/ObtainAchievementsFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/ObtainAchievementsFactory.java @@ -15,6 +15,7 @@ import java.util.LinkedList; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.Entity; @@ -48,14 +49,14 @@ public Collection createAchievements() { achievements.add(createAchievement( "obtain.wish", "A Wish Came True", "Get an item from the wishing well", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerGotNumberOfItemsFromWellCondition(0))); // Vegetable harvest achievement achievements.add(createAchievement( "obtain.harvest.vegetable", "Farmer", "Harvest 3 of all vegetables that grow in Faiumoni", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasHarvestedNumberOfItemsCondition(3, "carrot", "lettuce", "broccoli", "cauliflower", "leek", "onion", "zucchini", "spinach", "collard", "garlic", "artichoke"))); @@ -64,7 +65,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "obtain.harvest.fruit", "Fruit Salad", "Harvest 3 of all fruit that grow in Faiumoni", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasHarvestedNumberOfItemsCondition(3, "apple", "banana", "cherry", "coconut", "grapes", "olive", "pear", "pineapple", "pomegranate", "tomato", "watermelon"))); @@ -73,7 +74,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "obtain.fish", "Fisherman", "Catch 15 of each type of fish", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerHasHarvestedNumberOfItemsCondition(15, "char", "clownfish", "cod", "mackerel", "perch", "red lionfish", "roach", "surgeonfish", "trout"))); @@ -82,14 +83,14 @@ public Collection createAchievements() { achievements.add(createAchievement( "quest.special.collector", "Ultimate Collector", "Finish ultimate collector quest", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestCompletedCondition("ultimate_collector"))); // flower harvest achievements.add(createAchievement( "obtain.harvest.flower", "Green Thumb", "Harvest 20 of each type of growable flower", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasHarvestedNumberOfItemsCondition(20, "daisies", "lilia", "pansy", "zantedeschia"))); @@ -97,7 +98,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "obtain.harvest.herb", "Herbal Practitioner", "Harvest 20 of each type of herb found growing in Faiumoni", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerHasHarvestedNumberOfItemsCondition(20, "arandula", "kekik", "mandragora", "sclaria"))); @@ -105,7 +106,7 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_APPLES, "Bobbing for Apples", "Harvest or loot 1,000 apples", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new ChatCondition() { @Override public boolean fire(final Player player, final Sentence sentence, final Entity npc) { diff --git a/src/games/stendhal/server/core/rp/achievement/factory/OutsideZoneAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/OutsideZoneAchievementFactory.java index ca4d19c90f8..b1683a5fa8e 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/OutsideZoneAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/OutsideZoneAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright © 2003-2022 - Arianne * + * Copyright © 2003-2024 - Arianne * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.PlayerVisitedZonesCondition; @@ -40,56 +41,56 @@ public Collection createAchievements() { achievements.add(createAchievement( "zone.outside.semos", "Junior Explorer", "Visit all outside zones in the Semos region", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerVisitedZonesInRegionCondition("semos", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.ados", "Big City Explorer", "Visit all outside zones in the Ados region", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerVisitedZonesInRegionCondition("ados", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.fado", "Far South", "Visit all outside zones in the Fado region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("fado", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.orril", "Scout", "Visit all outside zones in the Orril region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("orril", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.amazon", "Jungle Explorer", "Visit all outside zones in the Amazon region", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerVisitedZonesInRegionCondition("amazon", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.athor", "Tourist", "Visit all outside zones in the Athor region", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerVisitedZonesInRegionCondition("athor", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.kikareukin", "Sky Tower", "Visit all outside zones in the Kikareukin region", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerVisitedZonesInRegionCondition("kikareukin", Boolean.TRUE, Boolean.TRUE))); achievements.add(createAchievement( "zone.outside.deniran", "Westerner", "Visit all outside zones in the Deniran region", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerVisitedZonesInRegionCondition("deniran", true, true))); // special zone achievements achievements.add(createAchievement( "zone.special.bank", "Safe Deposit", "Visit all banks", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesCondition( "int_semos_bank", "int_nalwor_bank", "int_kirdneh_bank", "int_fado_bank", "int_magic_bank", "int_ados_bank", diff --git a/src/games/stendhal/server/core/rp/achievement/factory/ProductionAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/ProductionAchievementFactory.java index 5acc7f1bea5..522392040c3 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/ProductionAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/ProductionAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.Entity; @@ -61,7 +62,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "production.class.food", "Gourmet", "Order all food types available from Faiumoni's cooks", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new AndCondition( new PlayerProducedNumberOfItemsCondition(1, foods), new QuestStateStartsWithCondition("coal_for_haunchy","waiting;")))); @@ -76,7 +77,7 @@ public Collection createAchievements() { achievements.add(createAchievement( "production.class.drink", "Thirsty Worker", "Order all drink types available from Faiumoni's cooks", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new AndCondition( new PlayerProducedNumberOfItemsCondition(1, drinks), new QuestCompletedCondition("soup_maker"), @@ -91,19 +92,19 @@ public Collection createAchievements() { achievements.add(createAchievement( "production.class.resource", "Alchemist", "Produce 5 of each kind of precious metal and resource", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerProducedNumberOfItemsCondition(5, resources))); achievements.add(createAchievement( "production.flour.1000", "Jenny's Assistant", "Produce 1000 flour", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new PlayerProducedNumberOfItemsCondition(1000, "flour"))); achievements.add(createAchievement( "production.sow.flowers.all", "Mother Nature's Helper", "Sow 1000 of each type of sowable flower seed and bulb", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new ChatCondition() { @Override public boolean fire(final Player player, final Sentence sentence, final Entity npc) { diff --git a/src/games/stendhal/server/core/rp/achievement/factory/QuestAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/QuestAchievementFactory.java index b693e1c00ed..493dd0efc9c 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/QuestAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/QuestAchievementFactory.java @@ -15,6 +15,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.core.rp.achievement.condition.QuestCountCompletedCondition; @@ -46,70 +47,70 @@ public Collection createAchievements() { achievements.add(createAchievement( "quest.special.elf_princess.0025", "Faiumoni's Casanova", "Finish elf princess quest 25 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("elf_princess", 2, 24))); // Kill Monks quest achievement achievements.add(createAchievement( "quest.special.kill_monks.0025", "Heretic", "Finish Kill Monks quest 25 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("kill_monks", 2, 24))); // Maze achievements.add(createAchievement( "quest.special.maze", "Pathfinder", "Finish the maze", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("maze", 2, 0))); // Balloon for Bobby achievements.add(createAchievement( "quest.bobby.balloons.0005", "Fairgoer", "Bring Bobby 5 balloons", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("balloon_bobby", 1, 4))); // Meal for Groongo Rahnnt achievements.add(createAchievement( "quest.groongo.meals.0050", "Patiently Waiting on Grumpy", "Serve up 50 decent meals to Groongo Rahnnt", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("meal_for_groongo", 7, 49))); // Restock the Flower Shop achievements.add(createAchievement( ID_FLOWERSHOP, "Floral Fondness", "Help restock Nalwor flower shop 50 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("restock_flowershop", 2, 49))); // have completed all quests in Semos City? achievements.add(createAchievement( "quest.special.semos", "Aide to Semos Folk", "Complete all quests in Semos City", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestsInRegionCompletedCondition(Region.SEMOS_CITY))); // have completed all quests in Ados City? achievements.add(createAchievement( "quest.special.ados", "Helper of Ados City Dwellers", "Complete all quests in Ados City", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestsInRegionCompletedCondition(Region.ADOS_CITY))); // complete nearly all the quests in the game? achievements.add(createAchievement( "quest.count.80", "Quest Junkie", "Complete at least 80 quests", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestCountCompletedCondition(80))); // deliver 5 hot pizzas achievements.add(createAchievement( "quest.pizza_delivery.hot.0025", "30 Minutes or Less", "Deliver 25 hot pizzas", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("pizza_delivery", 3, 24))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/SemosMonsterQuestAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/SemosMonsterQuestAchievementFactory.java index 16fc8ac0c1a..4853bebff1e 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/SemosMonsterQuestAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/SemosMonsterQuestAchievementFactory.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -15,6 +15,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.QuestStateGreaterThanCondition; @@ -47,37 +48,37 @@ public Collection createAchievements() { achievements.add(createAchievement( ID_PROTECTOR, "Semos's Protector", "Finish daily monster quest 10 times", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("daily", 2, 9))); achievements.add(createAchievement( ID_GUARDIAN, "Semos's Guardian", "Finish daily monster quest 50 times", - Achievement.EASY_BASE_SCORE, true, + HOFScore.EASY, true, new QuestStateGreaterThanCondition("daily", 2, 49))); achievements.add(createAchievement( ID_HERO, "Semos's Hero", "Finish daily monster quest 100 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("daily", 2, 99))); achievements.add(createAchievement( ID_CHAMPION, "Semos's Champion", "Finish daily monster quest 250 times", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new QuestStateGreaterThanCondition("daily", 2, 249))); achievements.add(createAchievement( ID_VANQUISHER, "Semos's Vanquisher", "Finish daily monster quest 500 times", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new QuestStateGreaterThanCondition("daily", 2, 499))); achievements.add(createAchievement( ID_RULER, "Semos's Ruler", "Finish daily monster quest 1,000 times", - Achievement.EXTREME_BASE_SCORE, true, + HOFScore.EXTREME, true, new QuestStateGreaterThanCondition("daily", 2, 999))); return achievements; diff --git a/src/games/stendhal/server/core/rp/achievement/factory/UndergroundZoneAchievementFactory.java b/src/games/stendhal/server/core/rp/achievement/factory/UndergroundZoneAchievementFactory.java index d1637bf001c..b32c30eb0ec 100644 --- a/src/games/stendhal/server/core/rp/achievement/factory/UndergroundZoneAchievementFactory.java +++ b/src/games/stendhal/server/core/rp/achievement/factory/UndergroundZoneAchievementFactory.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2022 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.LinkedList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.achievement.Achievement; import games.stendhal.server.core.rp.achievement.Category; import games.stendhal.server.entity.npc.condition.PlayerVisitedZonesInRegionCondition; @@ -39,37 +40,37 @@ public Collection createAchievements() { achievements.add(createAchievement( "zone.underground.semos", "Canary", "Visit all underground zones in the Semos region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("semos", Boolean.TRUE, Boolean.FALSE))); achievements.add(createAchievement( "zone.underground.nalwor", "Fear not Drows nor Hell", "Visit all underground zones in the Nalwor region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("nalwor", Boolean.TRUE, Boolean.FALSE))); achievements.add(createAchievement( "zone.underground.athor", "Labyrinth Solver", "Visit all underground zones in the Athor region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("athor", Boolean.TRUE, Boolean.FALSE))); achievements.add(createAchievement( "zone.underground.amazon", "Human Mole", "Visit all underground zones in the Amazon region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("amazon", Boolean.TRUE, Boolean.FALSE))); achievements.add(createAchievement( "zone.underground.ados", "Deep Dweller", "Visit all underground zones in the Ados region", - Achievement.MEDIUM_BASE_SCORE, true, + HOFScore.MEDIUM, true, new PlayerVisitedZonesInRegionCondition("ados", Boolean.TRUE, Boolean.FALSE))); achievements.add(createAchievement( "zone.underground.deniran", "Spelunker", "Visit all underground zones in the Deniran region", - Achievement.HARD_BASE_SCORE, true, + HOFScore.HARD, true, new PlayerVisitedZonesInRegionCondition("deniran", true, false))); return achievements; From 92395a978f0baf90eed25bb6b7e7f7376759af68 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 23:48:54 -0700 Subject: [PATCH 07/11] Mechanism for applying quest scoring to Hall of Fame --- .../server/core/rp/StendhalQuestSystem.java | 16 +++++++ .../server/entity/npc/quest/BuiltQuest.java | 1 + .../server/entity/npc/quest/QuestBuilder.java | 28 ++++++++++++ .../stendhal/server/entity/player/Player.java | 10 +++++ .../server/maps/quests/AbstractQuest.java | 43 +++++++++++++++++++ .../stendhal/server/maps/quests/IQuest.java | 26 +++++++++++ .../server/maps/quests/QuestInfo.java | 26 +++++++++++ 7 files changed, 150 insertions(+) diff --git a/src/games/stendhal/server/core/rp/StendhalQuestSystem.java b/src/games/stendhal/server/core/rp/StendhalQuestSystem.java index 43daf24e994..ef0c2c81356 100644 --- a/src/games/stendhal/server/core/rp/StendhalQuestSystem.java +++ b/src/games/stendhal/server/core/rp/StendhalQuestSystem.java @@ -522,6 +522,22 @@ private Collection findCompletedQuests(final Player player) { return findCompletedQuests(player, false); } + /** + * Retrieves points total for completed quests to apply to Hall of Fame. + * + * @param player + * Player to whom points are being attributed. + * @return + * Total score for completed quests. + */ + public int getTotalHOFScore(final Player player) { + int score = 0; + for (final IQuest quest: findCompletedQuests(player, true)) { + score += quest.getHOFScore(player).value; + } + return score; + } + /** * gets the description of a quest * diff --git a/src/games/stendhal/server/entity/npc/quest/BuiltQuest.java b/src/games/stendhal/server/entity/npc/quest/BuiltQuest.java index 221d6770b9b..0f4f733ba43 100644 --- a/src/games/stendhal/server/entity/npc/quest/BuiltQuest.java +++ b/src/games/stendhal/server/entity/npc/quest/BuiltQuest.java @@ -113,6 +113,7 @@ public void addToWorld() { questBuilder.info().getRepeatableAfterMinutes() > 0, // all quest manuscript instances should be using index 2 for completions count 2); + setBaseHOFScore(questBuilder.getBaseHOFScore()); ChatCondition questCompletedCondition = questBuilder.task().buildQuestCompletedCondition(questSlot); ChatAction questCompleteAction = questBuilder.task().buildQuestCompleteAction(questSlot); diff --git a/src/games/stendhal/server/entity/npc/quest/QuestBuilder.java b/src/games/stendhal/server/entity/npc/quest/QuestBuilder.java index 8f49079967e..6c8b898262b 100644 --- a/src/games/stendhal/server/entity/npc/quest/QuestBuilder.java +++ b/src/games/stendhal/server/entity/npc/quest/QuestBuilder.java @@ -11,6 +11,9 @@ ***************************************************************************/ package games.stendhal.server.entity.npc.quest; +import games.stendhal.server.core.rp.HOFScore; + + /** * builds a quest * @@ -26,6 +29,9 @@ public class QuestBuilder completionsIndexes; + /** Score value of this quest for Hall of Fame. */ + private HOFScore baseScore = HOFScore.NONE; + public QuestInfo() { completionsIndexes = new Pair<>(null, null); @@ -147,4 +151,26 @@ public void setCompletionsIndexes(final Pair completionsIndexe public Pair getCompletionsIndexes() { return completionsIndexes; } + + /** + * Sets the completed quest score value for Hall of Fame. + * + * @param score + * Hall of Fame score value. + */ + public void setBaseHOFScore(final HOFScore score) { + baseScore = score; + } + + /** + * Retrieves the completed quest score value for Hall of Fame. + * + * The default value is no score. + * + * @return + * Hall of Fame score value. + */ + public HOFScore getBaseHOFScore() { + return baseScore; + } } From 9ae4fb54800f47341a42268beb5ca2109b868c55 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 16 Apr 2024 23:56:56 -0700 Subject: [PATCH 08/11] Add scoring to Daily Item, Daily Monster, Kirdneh Museum, Kill Enemy... ...Army, & Kill Blordroughs quests --- .../server/maps/quests/DailyItemQuest.java | 3 ++- .../server/maps/quests/DailyMonsterQuest.java | 3 +++ .../server/maps/quests/KillBlordroughs.java | 3 +++ .../server/maps/quests/KillEnemyArmy.java | 3 +++ .../server/maps/quests/WeeklyItemQuest.java | 19 +++++++++++++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/games/stendhal/server/maps/quests/DailyItemQuest.java b/src/games/stendhal/server/maps/quests/DailyItemQuest.java index 52cfa843ed3..c33d3e55278 100644 --- a/src/games/stendhal/server/maps/quests/DailyItemQuest.java +++ b/src/games/stendhal/server/maps/quests/DailyItemQuest.java @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -503,7 +504,7 @@ public void addToWorld() { "Daily Item Quest", "Mayor Chalmers needs supplies for Ados City.", true, 2); - + setBaseHOFScore(HOFScore.EASY); buildItemsMap(); getQuest(); diff --git a/src/games/stendhal/server/maps/quests/DailyMonsterQuest.java b/src/games/stendhal/server/maps/quests/DailyMonsterQuest.java index 5733ff0c165..cbb81e322fa 100644 --- a/src/games/stendhal/server/maps/quests/DailyMonsterQuest.java +++ b/src/games/stendhal/server/maps/quests/DailyMonsterQuest.java @@ -25,6 +25,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.creature.Creature; import games.stendhal.server.entity.creature.LevelBasedComparator; import games.stendhal.server.entity.npc.ChatAction; @@ -507,6 +508,8 @@ public void addToWorld() { "Daily Monster Quest", "Mayor Sakhs needs warriors to keep Semos City safe.", true); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/KillBlordroughs.java b/src/games/stendhal/server/maps/quests/KillBlordroughs.java index cc099167724..a2e5b7c4448 100644 --- a/src/games/stendhal/server/maps/quests/KillBlordroughs.java +++ b/src/games/stendhal/server/maps/quests/KillBlordroughs.java @@ -22,6 +22,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rule.EntityManager; import games.stendhal.server.entity.creature.Creature; import games.stendhal.server.entity.item.StackableItem; @@ -419,6 +420,8 @@ public void addToWorld() { "Kill Blordroughs", "Mrotho wants some Blordrough warriors killed.", true); + setBaseHOFScore(HOFScore.HARD); + step_1(); } diff --git a/src/games/stendhal/server/maps/quests/KillEnemyArmy.java b/src/games/stendhal/server/maps/quests/KillEnemyArmy.java index be6b89400e3..1623a9a11a4 100644 --- a/src/games/stendhal/server/maps/quests/KillEnemyArmy.java +++ b/src/games/stendhal/server/maps/quests/KillEnemyArmy.java @@ -23,6 +23,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -509,6 +510,8 @@ public void addToWorld() { "Kill Enemy Army", "Despot Halb Errvl has a vendetta against any army who opposes him.", true, 3); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); } diff --git a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java index 6ce484174e2..a769e35e820 100644 --- a/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java +++ b/src/games/stendhal/server/maps/quests/WeeklyItemQuest.java @@ -24,6 +24,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ChatCondition; @@ -558,6 +559,7 @@ public void addToWorld() { "Kirdneh Museum Needs Help!", "Hazel, the curator of the Kirdneh Museum, wants as many rare exhibits as she can afford.", true, 2); + setBaseHOFScore(HOFScore.MEDIUM); buildItemsMap(); getQuest(); @@ -591,4 +593,21 @@ public String getRegion() { public String getNPCName() { return "Hazel"; } + + /** + * Calculates Hall of Fame score based on player tier. + * + * Score is affected by player level because items that are more difficult to obtain may be + * requested at higher levels. + * + * @param player + * Player instance used to adjust scoring. + * @return + * Hall of Fame score value. + */ + @Override + public HOFScore getHOFScore(final Player player) { + final int lastCompletionLevel = getLevelAtLastCompletion(WeeklyItemQuest.SLOT_INDEX_LEVEL, player); + return new HOFScore((int) Math.floor(PlayerTier.getTier(lastCompletionLevel).multiplier * getBaseHOFScore().value)); + } } From e1ef477791711a90e3fa1e161e83f17ed632fa63 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Wed, 17 Apr 2024 00:30:24 -0700 Subject: [PATCH 09/11] Set quests with easy scoring --- .../server/maps/quests/AGrandfathersWish.java | 9 +++++---- .../server/maps/quests/ArmorForDagobert.java | 5 ++++- .../server/maps/quests/BalloonForBobby.java | 3 +++ .../server/maps/quests/BeerForHayunn.java | 6 +++++- .../server/maps/quests/BowsForOuchit.java | 15 +++++++++------ .../stendhal/server/maps/quests/Campfire.java | 3 +++ .../server/maps/quests/ChocolateForElisabeth.java | 5 ++++- .../server/maps/quests/CleanStorageSpace.java | 5 ++++- .../stendhal/server/maps/quests/ClubOfThorns.java | 11 +++++++---- .../server/maps/quests/CoalForHaunchy.java | 3 +++ .../maps/quests/CodedMessageFromFinnFarmer.java | 11 +++++++---- .../maps/quests/EasterGiftsForChildren.java | 4 +++- .../server/maps/quests/EggsForMarianne.java | 3 +++ .../stendhal/server/maps/quests/FindJefsMom.java | 3 +++ .../stendhal/server/maps/quests/FishSoup.java | 5 ++++- .../server/maps/quests/FishSoupForHughie.java | 3 +++ .../maps/quests/FishermansLicenseCollector.java | 5 ++++- .../server/maps/quests/FishermansLicenseQuiz.java | 5 ++++- .../server/maps/quests/FruitsForCoralia.java | 5 ++++- .../server/maps/quests/GoodiesForRudolph.java | 4 +++- .../server/maps/quests/HatForMonogenes.java | 7 +++++-- .../server/maps/quests/HelpWithTheHarvest.java | 9 ++++++--- .../server/maps/quests/HerbsForCarmen.java | 5 ++++- .../stendhal/server/maps/quests/HungryJoshua.java | 5 ++++- .../server/maps/quests/IcecreamForAnnie.java | 5 ++++- .../stendhal/server/maps/quests/KillGnomes.java | 3 +++ .../server/maps/quests/KoboldishTorcibud.java | 3 +++ .../server/maps/quests/LearnAboutKarma.java | 5 ++++- .../server/maps/quests/LearnAboutOrbs.java | 5 ++++- .../server/maps/quests/LookBookforCeryl.java | 5 ++++- .../stendhal/server/maps/quests/LookUpQuote.java | 3 +++ .../stendhal/server/maps/quests/Marriage.java | 5 ++++- src/games/stendhal/server/maps/quests/Maze.java | 3 +++ .../stendhal/server/maps/quests/McPeglegIOU.java | 2 ++ .../server/maps/quests/MealForGroongo.java | 3 +++ .../server/maps/quests/MedicineForTad.java | 5 ++++- .../stendhal/server/maps/quests/MeetBunny.java | 2 ++ .../stendhal/server/maps/quests/MeetHackim.java | 5 ++++- .../stendhal/server/maps/quests/MeetHayunn.java | 5 ++++- src/games/stendhal/server/maps/quests/MeetIo.java | 5 ++++- .../stendhal/server/maps/quests/MeetKetteh.java | 5 +++-- .../server/maps/quests/MeetMarieHenri.java | 5 ++++- .../server/maps/quests/MeetMonogenes.java | 5 ++++- .../stendhal/server/maps/quests/MeetSanta.java | 4 +++- .../stendhal/server/maps/quests/MeetZynn.java | 5 ++++- .../server/maps/quests/NewsFromHackim.java | 3 +++ .../server/maps/quests/PizzaDelivery.java | 3 +++ .../stendhal/server/maps/quests/PlinksToy.java | 3 +++ .../server/maps/quests/RestockFlowerShop.java | 3 +++ .../stendhal/server/maps/quests/ReverseArrow.java | 4 +++- .../stendhal/server/maps/quests/RingMaker.java | 3 +++ .../stendhal/server/maps/quests/SheepGrowing.java | 5 ++++- src/games/stendhal/server/maps/quests/Soup.java | 3 +++ .../server/maps/quests/SuppliesForPhalk.java | 3 +++ .../server/maps/quests/TakeGoldforGrafindle.java | 5 ++++- .../stendhal/server/maps/quests/ThePiedPiper.java | 4 +++- .../server/maps/quests/ToysCollector.java | 5 ++++- .../server/maps/quests/TrapsForKlaas.java | 3 +++ .../server/maps/quests/WaterForXhiphin.java | 7 +++---- .../stendhal/server/maps/quests/ZooFood.java | 3 +++ 60 files changed, 225 insertions(+), 59 deletions(-) diff --git a/src/games/stendhal/server/maps/quests/AGrandfathersWish.java b/src/games/stendhal/server/maps/quests/AGrandfathersWish.java index 9da130023ba..09d155bddcd 100644 --- a/src/games/stendhal/server/maps/quests/AGrandfathersWish.java +++ b/src/games/stendhal/server/maps/quests/AGrandfathersWish.java @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; @@ -200,10 +201,10 @@ public List getHistory(final Player player) { public void addToWorld() { fillQuestInfo( "A Grandfather's Wish", - elias.getName() + " is grieved over the disappearance of his" - + " grandson.", - false - ); + elias.getName() + " is grieved over the disappearance of his grandson.", + false); + setBaseHOFScore(HOFScore.EASY); + prepareRequestStep(); prepareMarianneStep(); prepareFindPriestStep(); diff --git a/src/games/stendhal/server/maps/quests/ArmorForDagobert.java b/src/games/stendhal/server/maps/quests/ArmorForDagobert.java index c38b75400a7..ed421b437a9 100644 --- a/src/games/stendhal/server/maps/quests/ArmorForDagobert.java +++ b/src/games/stendhal/server/maps/quests/ArmorForDagobert.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -13,6 +13,7 @@ import java.util.Arrays; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.NPCList; import games.stendhal.server.entity.npc.SpeakerNPC; import games.stendhal.server.entity.npc.action.EquipItemAction; @@ -94,6 +95,8 @@ public BringItemQuestBuilder story() { .rewardWith(new IncreaseXPAction(50)) .rewardWith(new IncreaseKarmaAction(10)); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/BalloonForBobby.java b/src/games/stendhal/server/maps/quests/BalloonForBobby.java index eb11ceaa9d8..cf28b764e70 100644 --- a/src/games/stendhal/server/maps/quests/BalloonForBobby.java +++ b/src/games/stendhal/server/maps/quests/BalloonForBobby.java @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Outfit; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -82,6 +83,8 @@ public void addToWorld() { fillQuestInfo("Balloon for Bobby", "Young boy Bobby in Fado stares into the sky, searching for balloons. He loves them and wants to have one really bad.", true, null, 1); + setBaseHOFScore(HOFScore.EASY); + prepareRequestQuestStep(); prepareGreetWithBalloonStep(); prepareAttendingWithBalloonStep(); diff --git a/src/games/stendhal/server/maps/quests/BeerForHayunn.java b/src/games/stendhal/server/maps/quests/BeerForHayunn.java index 14143132618..9e7c47ffe4b 100644 --- a/src/games/stendhal/server/maps/quests/BeerForHayunn.java +++ b/src/games/stendhal/server/maps/quests/BeerForHayunn.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -12,6 +12,7 @@ package games.stendhal.server.maps.quests; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; @@ -95,6 +96,9 @@ public BringItemQuestBuilder story() { .rewardWith(new EquipItemAction("money", 20)) .rewardWith(new IncreaseXPAction(50)) .rewardWith(new IncreaseKarmaAction(10)); + + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/BowsForOuchit.java b/src/games/stendhal/server/maps/quests/BowsForOuchit.java index 9c4253656b5..91c6f08b118 100644 --- a/src/games/stendhal/server/maps/quests/BowsForOuchit.java +++ b/src/games/stendhal/server/maps/quests/BowsForOuchit.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import java.util.List; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -277,15 +278,17 @@ public void bringHairStep() { @Override public void addToWorld() { - prepareQuestStep(); - bringWoodStep(); - getHairStep(); - bringHairStep(); fillQuestInfo( "Bows for Ouchit", "Ouchit is running out of bows and arrows to sell!", false); - } + setBaseHOFScore(HOFScore.EASY); + + prepareQuestStep(); + bringWoodStep(); + getHairStep(); + bringHairStep(); +} @Override public boolean removeFromWorld() { diff --git a/src/games/stendhal/server/maps/quests/Campfire.java b/src/games/stendhal/server/maps/quests/Campfire.java index 72b419fa424..6c1876a68f1 100644 --- a/src/games/stendhal/server/maps/quests/Campfire.java +++ b/src/games/stendhal/server/maps/quests/Campfire.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipItemAction; import games.stendhal.server.entity.npc.action.EquipRandomItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; @@ -91,6 +92,8 @@ public BringItemQuestBuilder story() { .rewardWith(new EquipItemAction("charcoal", 10)) .rewardWith(new EquipRandomItemAction("meat=10;ham=10", false, "Thank you! Here, take [this_these] [number_item] and charcoal!")); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/ChocolateForElisabeth.java b/src/games/stendhal/server/maps/quests/ChocolateForElisabeth.java index 6a6fe66aac9..159a2a3478f 100644 --- a/src/games/stendhal/server/maps/quests/ChocolateForElisabeth.java +++ b/src/games/stendhal/server/maps/quests/ChocolateForElisabeth.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -20,6 +20,7 @@ import games.stendhal.common.Rand; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -306,6 +307,8 @@ public void addToWorld() { "Chocolate for Elisabeth", "Sweet, sweet chocolate! No one can live without it! And Elisabeth loooves to have some...", true); + setBaseHOFScore(HOFScore.EASY); + chocolateStep(); meetMummyStep(); } diff --git a/src/games/stendhal/server/maps/quests/CleanStorageSpace.java b/src/games/stendhal/server/maps/quests/CleanStorageSpace.java index c80c5058adf..a4c9395806d 100644 --- a/src/games/stendhal/server/maps/quests/CleanStorageSpace.java +++ b/src/games/stendhal/server/maps/quests/CleanStorageSpace.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.NPCList; import games.stendhal.server.entity.npc.SpeakerNPC; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; @@ -80,6 +81,8 @@ public KillCreaturesQuestBuilder story() { .rewardWith(new IncreaseKarmaAction(5.0)) .rewardWith(new IncreaseXPAction(100)); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/ClubOfThorns.java b/src/games/stendhal/server/maps/quests/ClubOfThorns.java index 85ddcf0219f..aebf5a9e186 100644 --- a/src/games/stendhal/server/maps/quests/ClubOfThorns.java +++ b/src/games/stendhal/server/maps/quests/ClubOfThorns.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -149,13 +150,15 @@ private void step_3() { @Override public void addToWorld() { - step_1(); - step_2(); - step_3(); fillQuestInfo( "Club of Thorns", "The Orc Saman will give a dangerous weapon to a mercenary who will help him.", false); + setBaseHOFScore(HOFScore.EASY); + + step_1(); + step_2(); + step_3(); } @Override diff --git a/src/games/stendhal/server/maps/quests/CoalForHaunchy.java b/src/games/stendhal/server/maps/quests/CoalForHaunchy.java index e58ff466670..af8ede88b21 100644 --- a/src/games/stendhal/server/maps/quests/CoalForHaunchy.java +++ b/src/games/stendhal/server/maps/quests/CoalForHaunchy.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.NPCList; import games.stendhal.server.entity.npc.action.EquipRandomAmountOfItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; @@ -97,6 +98,8 @@ public BringItemQuestBuilder story() { .rewardWith(new EquipRandomAmountOfItemAction("grilled steak", 1, 4, 1, "Thank you! Take [this_these] [number_item] from my grill!")); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/CodedMessageFromFinnFarmer.java b/src/games/stendhal/server/maps/quests/CodedMessageFromFinnFarmer.java index f7e327f2011..2128a8fdfdc 100644 --- a/src/games/stendhal/server/maps/quests/CodedMessageFromFinnFarmer.java +++ b/src/games/stendhal/server/maps/quests/CodedMessageFromFinnFarmer.java @@ -16,6 +16,7 @@ import games.stendhal.common.Rand; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ChatCondition; @@ -305,14 +306,16 @@ private void step3() { @Override public void addToWorld() { - step1(); - step2(); - step3(); fillQuestInfo( "Coded Message from Finn Farmer", "Finn Farmer has important, secret information for George.", false, QUEST_INDEX_REPEATED); - } + setBaseHOFScore(HOFScore.EASY); + + step1(); + step2(); + step3(); +} @Override public String getSlotName() { diff --git a/src/games/stendhal/server/maps/quests/EasterGiftsForChildren.java b/src/games/stendhal/server/maps/quests/EasterGiftsForChildren.java index 275380cb731..098a0518ed8 100644 --- a/src/games/stendhal/server/maps/quests/EasterGiftsForChildren.java +++ b/src/games/stendhal/server/maps/quests/EasterGiftsForChildren.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2011 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -251,6 +252,7 @@ public void addToWorld() { "Easter Gifts for Children", "Caroline, the nice tavern owner in Ados city, wants to make some children happy during Easter holidays.", false); + setBaseHOFScore(HOFScore.EASY); if (System.getProperty("stendhal.easter") != null) { prepareRequestingStep(); diff --git a/src/games/stendhal/server/maps/quests/EggsForMarianne.java b/src/games/stendhal/server/maps/quests/EggsForMarianne.java index 449d57fe328..1e45d16aa70 100644 --- a/src/games/stendhal/server/maps/quests/EggsForMarianne.java +++ b/src/games/stendhal/server/maps/quests/EggsForMarianne.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipRandomItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; @@ -97,6 +98,8 @@ public BringItemQuestBuilder story() { .rewardWith(new IncreaseKarmaAction(50)) .rewardWith(new EquipRandomItemAction("pansy=12;daisies=12", false, "Thank you! Here, take [this_these] [number_item]!")); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/FindJefsMom.java b/src/games/stendhal/server/maps/quests/FindJefsMom.java index 8801c58a7f0..71558347a73 100644 --- a/src/games/stendhal/server/maps/quests/FindJefsMom.java +++ b/src/games/stendhal/server/maps/quests/FindJefsMom.java @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -265,6 +266,8 @@ public void addToWorld() { "Find Jefs Mother", "Jef, a young boy in Kirdneh city, waits for his mum, Amber, who didn't return yet from the market.", false, 2); + setBaseHOFScore(HOFScore.EASY); + offerQuestStep(); findMomStep(); bringFlowerToJefStep(); diff --git a/src/games/stendhal/server/maps/quests/FishSoup.java b/src/games/stendhal/server/maps/quests/FishSoup.java index 774f2a3e8eb..e108b441b0b 100644 --- a/src/games/stendhal/server/maps/quests/FishSoup.java +++ b/src/games/stendhal/server/maps/quests/FishSoup.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023- Stendhal * + * (C) Copyright 2003-2024- Stendhal * *************************************************************************** *************************************************************************** * * @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -392,6 +393,8 @@ public void addToWorld() { "Fish Soup", "Florence Boullabaisse makes a healthy and tasty fish soup, but it needs rather a lot of ingredients.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/FishSoupForHughie.java b/src/games/stendhal/server/maps/quests/FishSoupForHughie.java index d017d49daf0..e68c14c4e8a 100644 --- a/src/games/stendhal/server/maps/quests/FishSoupForHughie.java +++ b/src/games/stendhal/server/maps/quests/FishSoupForHughie.java @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -265,6 +266,8 @@ public void addToWorld() { "Fish Soup for Hughie", "Anastasia's son Hughie is sick and needs something to heal him.", true); + setBaseHOFScore(HOFScore.EASY); + prepareRequestingStep(); prepareBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/FishermansLicenseCollector.java b/src/games/stendhal/server/maps/quests/FishermansLicenseCollector.java index f7f38fd7b61..619e6b098f0 100644 --- a/src/games/stendhal/server/maps/quests/FishermansLicenseCollector.java +++ b/src/games/stendhal/server/maps/quests/FishermansLicenseCollector.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2011 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -245,6 +246,8 @@ public void addToWorld() { "Fisherman's License part 2", "Santiago will grant a fisherman's license to those who can prove their skills.", true); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java b/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java index 9e6d8d5db2c..c30986ef402 100644 --- a/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java +++ b/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -23,6 +23,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -264,6 +265,8 @@ public void addToWorld() { "Fishermans License Quiz", "Santiago the fisherman will examine fishermen on their knowledge of fish species.", false); + setBaseHOFScore(HOFScore.EASY); + createQuizStep(); } diff --git a/src/games/stendhal/server/maps/quests/FruitsForCoralia.java b/src/games/stendhal/server/maps/quests/FruitsForCoralia.java index aa3797e68e6..fc0235e0048 100644 --- a/src/games/stendhal/server/maps/quests/FruitsForCoralia.java +++ b/src/games/stendhal/server/maps/quests/FruitsForCoralia.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.Map; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -102,6 +103,8 @@ public void addToWorld() { fillQuestInfo("Fruits for Coralia", "The Ados Tavern barmaid, Coralia, searches for fresh fruits for her exotic hat.", true); + setBaseHOFScore(HOFScore.EASY); + prepareQuestStep(); prepareBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/GoodiesForRudolph.java b/src/games/stendhal/server/maps/quests/GoodiesForRudolph.java index 053232274bb..b6b37c5cdaf 100644 --- a/src/games/stendhal/server/maps/quests/GoodiesForRudolph.java +++ b/src/games/stendhal/server/maps/quests/GoodiesForRudolph.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import java.util.List; import games.stendhal.common.constants.Occasion; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -251,6 +252,7 @@ public void addToWorld() { "Goodies for Rudolph", "Rudolph, Santa's favorite reindeer, desperately wants some goodies.", false); + setBaseHOFScore(HOFScore.EASY); if (Occasion.CHRISTMAS) { addStepsToWorld(); diff --git a/src/games/stendhal/server/maps/quests/HatForMonogenes.java b/src/games/stendhal/server/maps/quests/HatForMonogenes.java index beb7806c37f..6fce22c74b7 100644 --- a/src/games/stendhal/server/maps/quests/HatForMonogenes.java +++ b/src/games/stendhal/server/maps/quests/HatForMonogenes.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -12,6 +12,7 @@ package games.stendhal.server.maps.quests; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; import games.stendhal.server.entity.npc.quest.BringItemQuestBuilder; @@ -84,7 +85,9 @@ public BringItemQuestBuilder story() { .rewardWith(new IncreaseXPAction(50)) .rewardWith(new IncreaseKarmaAction(10)); - return quest; + quest.setBaseHOFScore(HOFScore.EASY); + + return quest; } public boolean removeFromWorld() { diff --git a/src/games/stendhal/server/maps/quests/HelpWithTheHarvest.java b/src/games/stendhal/server/maps/quests/HelpWithTheHarvest.java index f5a5c0424db..f2823152757 100644 --- a/src/games/stendhal/server/maps/quests/HelpWithTheHarvest.java +++ b/src/games/stendhal/server/maps/quests/HelpWithTheHarvest.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.mapstuff.block.Block; import games.stendhal.server.entity.mapstuff.block.BlockTarget; import games.stendhal.server.entity.npc.ChatAction; @@ -119,10 +120,12 @@ public int getMinLevel() { @Override public void addToWorld() { + fillQuestInfo(getName(), "Eheneumniranin needs help with the harvest.", false); + setBaseHOFScore(HOFScore.EASY); + placeCartsAndTargets(); configureNPC(); - fillQuestInfo(getName(), "Eheneumniranin needs help with the harvest.", false); - } +} private void configureNPC() { SpeakerNPC npc = npcs.get("Eheneumniranin"); diff --git a/src/games/stendhal/server/maps/quests/HerbsForCarmen.java b/src/games/stendhal/server/maps/quests/HerbsForCarmen.java index 80c6556ebe4..2ce24ea9b7b 100644 --- a/src/games/stendhal/server/maps/quests/HerbsForCarmen.java +++ b/src/games/stendhal/server/maps/quests/HerbsForCarmen.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import java.util.Map; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -286,6 +287,8 @@ public void addToWorld() { "Herbs for Carmen", "The Semos healer, Carmen, searches for ingredients to make potions and other useful medicines with.", true); + setBaseHOFScore(HOFScore.EASY); + prepareRequestingStep(); prepareBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/HungryJoshua.java b/src/games/stendhal/server/maps/quests/HungryJoshua.java index 3537d0823f4..efef5b3211f 100644 --- a/src/games/stendhal/server/maps/quests/HungryJoshua.java +++ b/src/games/stendhal/server/maps/quests/HungryJoshua.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableList; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -269,6 +270,8 @@ public void addToWorld() { "Hungry Joshua", "Xoderos is worried about his brother Joshua who lives in Ados because they are short of supplies.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/IcecreamForAnnie.java b/src/games/stendhal/server/maps/quests/IcecreamForAnnie.java index 4d670b366a2..b75c1de35b3 100644 --- a/src/games/stendhal/server/maps/quests/IcecreamForAnnie.java +++ b/src/games/stendhal/server/maps/quests/IcecreamForAnnie.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -288,6 +289,8 @@ public void addToWorld() { "Ice Cream for Annie", "The best surprise for a litte girl like Annie is a cool ice cream on summer days while playing on the playground.", true); + setBaseHOFScore(HOFScore.EASY); + icecreamStep(); meetMummyStep(); } diff --git a/src/games/stendhal/server/maps/quests/KillGnomes.java b/src/games/stendhal/server/maps/quests/KillGnomes.java index b9e2f72bc42..1230d77d719 100644 --- a/src/games/stendhal/server/maps/quests/KillGnomes.java +++ b/src/games/stendhal/server/maps/quests/KillGnomes.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipItemAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; import games.stendhal.server.entity.npc.quest.KillCreaturesQuestBuilder; @@ -92,6 +93,8 @@ public KillCreaturesQuestBuilder story() { .rewardWith(new IncreaseXPAction(100)) .rewardWith(new EquipItemAction("potion", 3)); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/KoboldishTorcibud.java b/src/games/stendhal/server/maps/quests/KoboldishTorcibud.java index 338dcbe70a8..00cbbcc2d0a 100644 --- a/src/games/stendhal/server/maps/quests/KoboldishTorcibud.java +++ b/src/games/stendhal/server/maps/quests/KoboldishTorcibud.java @@ -23,6 +23,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -125,6 +126,8 @@ public void addToWorld() { "Koboldish Torcibud", "Wrviliza needs some stuff to prepare her famous Koboldish Torcibud.", true); + setBaseHOFScore(HOFScore.EASY); + phase_1(); phase_2(); } diff --git a/src/games/stendhal/server/maps/quests/LearnAboutKarma.java b/src/games/stendhal/server/maps/quests/LearnAboutKarma.java index 318b8799b44..f1c194beab3 100644 --- a/src/games/stendhal/server/maps/quests/LearnAboutKarma.java +++ b/src/games/stendhal/server/maps/quests/LearnAboutKarma.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -179,6 +180,8 @@ public void addToWorld() { "Learn About Karma", "Sarzina will teach about karma.", false); + setBaseHOFScore(HOFScore.EASY); + step1(); } diff --git a/src/games/stendhal/server/maps/quests/LearnAboutOrbs.java b/src/games/stendhal/server/maps/quests/LearnAboutOrbs.java index 8cb96d2f97c..63a5d445a1f 100644 --- a/src/games/stendhal/server/maps/quests/LearnAboutOrbs.java +++ b/src/games/stendhal/server/maps/quests/LearnAboutOrbs.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.List; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -142,6 +143,8 @@ public void addToWorld() { "Learn About Orbs", "Ilisa will teach about using orbs.", false); + setBaseHOFScore(HOFScore.EASY); + step1(); } diff --git a/src/games/stendhal/server/maps/quests/LookBookforCeryl.java b/src/games/stendhal/server/maps/quests/LookBookforCeryl.java index 2afb70bdfc4..04362c8d4e2 100644 --- a/src/games/stendhal/server/maps/quests/LookBookforCeryl.java +++ b/src/games/stendhal/server/maps/quests/LookBookforCeryl.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -12,6 +12,7 @@ package games.stendhal.server.maps.quests; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.NPCList; @@ -121,6 +122,8 @@ public BringItemQuestBuilder story() { "Haven't you got that #book back from #Jynath? Please go look for it, quickly!", new SetQuestAction(QUEST_SLOT, "start")); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/LookUpQuote.java b/src/games/stendhal/server/maps/quests/LookUpQuote.java index 94d796c800c..321929a4998 100644 --- a/src/games/stendhal/server/maps/quests/LookUpQuote.java +++ b/src/games/stendhal/server/maps/quests/LookUpQuote.java @@ -24,6 +24,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.common.parser.SimilarExprMatcher; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -206,6 +207,8 @@ public void addToWorld() { "Look Up Quote", "Pequod has forgotten a quote by a famous fisherman.", false); + setBaseHOFScore(HOFScore.EASY); + createFishingRod(); } @Override diff --git a/src/games/stendhal/server/maps/quests/Marriage.java b/src/games/stendhal/server/maps/quests/Marriage.java index bd59541a473..1bfa19e1cce 100644 --- a/src/games/stendhal/server/maps/quests/Marriage.java +++ b/src/games/stendhal/server/maps/quests/Marriage.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -14,6 +14,7 @@ import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.player.Player; import games.stendhal.server.maps.Region; import games.stendhal.server.maps.quests.marriage.MarriageQuestChain; @@ -71,6 +72,8 @@ public void addToWorld() { "Marriage", "Lucky ones who find a partner they want to share their life with can get married in Fado Church.", false); + setBaseHOFScore(HOFScore.EASY); + marriage = new MarriageQuestChain(); marriage.addToWorld(); } diff --git a/src/games/stendhal/server/maps/quests/Maze.java b/src/games/stendhal/server/maps/quests/Maze.java index 6053040dcb5..ae6e633474f 100644 --- a/src/games/stendhal/server/maps/quests/Maze.java +++ b/src/games/stendhal/server/maps/quests/Maze.java @@ -19,6 +19,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.mapstuff.portal.Portal; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -50,6 +51,8 @@ public void addToWorld() { "Maze", "Haizen's maze is a great challenge for path finders.", false, 2); + setBaseHOFScore(HOFScore.EASY); + addMazeSign(); setupConversation(); } diff --git a/src/games/stendhal/server/maps/quests/McPeglegIOU.java b/src/games/stendhal/server/maps/quests/McPeglegIOU.java index d3694a8dbb9..4da223897d8 100644 --- a/src/games/stendhal/server/maps/quests/McPeglegIOU.java +++ b/src/games/stendhal/server/maps/quests/McPeglegIOU.java @@ -20,6 +20,7 @@ import games.stendhal.common.constants.SoundLayer; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; @@ -111,6 +112,7 @@ public void addToWorld() { "McPegleg IOU", "McPegleg doesn't always have cash on hand, and sometimes passes out IOUs instead.", false); + setBaseHOFScore(HOFScore.EASY); step_1(); step_2(); diff --git a/src/games/stendhal/server/maps/quests/MealForGroongo.java b/src/games/stendhal/server/maps/quests/MealForGroongo.java index 6af8759141e..dc4b014e1ce 100644 --- a/src/games/stendhal/server/maps/quests/MealForGroongo.java +++ b/src/games/stendhal/server/maps/quests/MealForGroongo.java @@ -24,6 +24,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; @@ -276,6 +277,8 @@ public void addToWorld() { "Meal for Groongo Rahnnt", "Groongo is hungry and wants to have a decent meal at Fado hotel's restaurant.", true, 7); + setBaseHOFScore(HOFScore.EASY); + stageBeginQuest(); stageCollectIngredientsForMainDish(); stageCheckForDessert(); diff --git a/src/games/stendhal/server/maps/quests/MedicineForTad.java b/src/games/stendhal/server/maps/quests/MedicineForTad.java index 8a4b8821caa..8551a246f31 100644 --- a/src/games/stendhal/server/maps/quests/MedicineForTad.java +++ b/src/games/stendhal/server/maps/quests/MedicineForTad.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -434,6 +435,8 @@ public void addToWorld() { "Medicine for Tad", "Tad, a boy in Semos Hostel, needs help to get his medicine.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/MeetBunny.java b/src/games/stendhal/server/maps/quests/MeetBunny.java index 335d46f046e..447bc0bd700 100644 --- a/src/games/stendhal/server/maps/quests/MeetBunny.java +++ b/src/games/stendhal/server/maps/quests/MeetBunny.java @@ -18,6 +18,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -121,6 +122,7 @@ public void addToWorld() { "Meet Easter Bunny", "At Easter one may see the Easter Bunny hopping around the world of Faiumoni. He is really fast even though he carries some heavy surprises with him...", false); + setBaseHOFScore(HOFScore.EASY); if (System.getProperty("stendhal.easterbunny") != null) { createbunny(); diff --git a/src/games/stendhal/server/maps/quests/MeetHackim.java b/src/games/stendhal/server/maps/quests/MeetHackim.java index 86cac581b06..59edbb07044 100644 --- a/src/games/stendhal/server/maps/quests/MeetHackim.java +++ b/src/games/stendhal/server/maps/quests/MeetHackim.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import java.util.List; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -136,6 +137,8 @@ public void addToWorld() { "Meet Hackim Easso", "The blacksmith assistant Hackim Easso has some useful information.", false); + setBaseHOFScore(HOFScore.EASY); + yesTrigger = new LinkedList(ConversationPhrases.YES_MESSAGES); yesTrigger.add("Xin Blanca"); yesTrigger.add("Blanca"); diff --git a/src/games/stendhal/server/maps/quests/MeetHayunn.java b/src/games/stendhal/server/maps/quests/MeetHayunn.java index d99408a99c1..57ead9c6c9f 100644 --- a/src/games/stendhal/server/maps/quests/MeetHayunn.java +++ b/src/games/stendhal/server/maps/quests/MeetHayunn.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import org.apache.log4j.Logger; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -239,6 +240,8 @@ public void addToWorld() { "Meet Hayunn Naratha", "Hayunn Naratha can teach young heroes important basics of the Stendhal world.", false); + setBaseHOFScore(HOFScore.EASY); + prepareHayunn(); } diff --git a/src/games/stendhal/server/maps/quests/MeetIo.java b/src/games/stendhal/server/maps/quests/MeetIo.java index 6b3b3739581..aaff4be47ff 100644 --- a/src/games/stendhal/server/maps/quests/MeetIo.java +++ b/src/games/stendhal/server/maps/quests/MeetIo.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -174,6 +175,8 @@ public void addToWorld() { "Meet Io", "Io Flotto can teach about how to communicate.", false); + setBaseHOFScore(HOFScore.EASY); + prepareIO(); } diff --git a/src/games/stendhal/server/maps/quests/MeetKetteh.java b/src/games/stendhal/server/maps/quests/MeetKetteh.java index dd0392ac5b2..2f8698fdf69 100644 --- a/src/games/stendhal/server/maps/quests/MeetKetteh.java +++ b/src/games/stendhal/server/maps/quests/MeetKetteh.java @@ -15,6 +15,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -187,14 +188,14 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser null); } - - @Override public void addToWorld() { fillQuestInfo( "Meet Ketteh Wehoh", "An elegant lady waits in the town hall in Semos and takes care that new inhabitants of Faiumoni will walk around without freezing. She is the town Decency and Manners Warden.", false); + setBaseHOFScore(HOFScore.EASY); + step1(); } diff --git a/src/games/stendhal/server/maps/quests/MeetMarieHenri.java b/src/games/stendhal/server/maps/quests/MeetMarieHenri.java index 1fb307b71b7..f96fc4db266 100644 --- a/src/games/stendhal/server/maps/quests/MeetMarieHenri.java +++ b/src/games/stendhal/server/maps/quests/MeetMarieHenri.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -20,6 +20,7 @@ import games.stendhal.common.parser.JokerExprMatcher; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -74,6 +75,8 @@ public void addToWorld() { fillQuestInfo("Meet Marie-Henri", "A famous French writer tests general knowledge in Ados Library.", false); + setBaseHOFScore(HOFScore.EASY); + createSteps(); } diff --git a/src/games/stendhal/server/maps/quests/MeetMonogenes.java b/src/games/stendhal/server/maps/quests/MeetMonogenes.java index 062a8652227..66a374208da 100644 --- a/src/games/stendhal/server/maps/quests/MeetMonogenes.java +++ b/src/games/stendhal/server/maps/quests/MeetMonogenes.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -57,6 +58,8 @@ public void addToWorld() { "Meet Monogenes", "A wise old man in Semos has a map to guide newcomers through the town.", false); + setBaseHOFScore(HOFScore.EASY); + final SpeakerNPC npc = npcs.get("Monogenes"); npc.addGreeting(null, new SayTextAction("Hi again, [name]. How can I #help you this time?")); diff --git a/src/games/stendhal/server/maps/quests/MeetSanta.java b/src/games/stendhal/server/maps/quests/MeetSanta.java index 4696928acec..1f60667a332 100644 --- a/src/games/stendhal/server/maps/quests/MeetSanta.java +++ b/src/games/stendhal/server/maps/quests/MeetSanta.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -23,6 +23,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.core.events.LoginListener; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Outfit; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -233,6 +234,7 @@ public void addToWorld() { "Meet Santa", "Jingle bells, jingle bells, jingle all the way... Ho Ho Ho! Santa Claus delivers presents around Christmas time.", false); + setBaseHOFScore(HOFScore.EASY); SingletonRepository.getLoginNotifier().addListener(this); if (System.getProperty("stendhal.santa") != null) { diff --git a/src/games/stendhal/server/maps/quests/MeetZynn.java b/src/games/stendhal/server/maps/quests/MeetZynn.java index 63279955e19..ddae872e03a 100644 --- a/src/games/stendhal/server/maps/quests/MeetZynn.java +++ b/src/games/stendhal/server/maps/quests/MeetZynn.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; import games.stendhal.server.entity.npc.condition.LevelGreaterThanCondition; @@ -153,6 +154,8 @@ public void addToWorld() { "Meet Zynn Iwuhos", "Zynn Iwuhos, in the Semos library, is a great source of useful information.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); } diff --git a/src/games/stendhal/server/maps/quests/NewsFromHackim.java b/src/games/stendhal/server/maps/quests/NewsFromHackim.java index 108f914b3b2..42c4c784071 100644 --- a/src/games/stendhal/server/maps/quests/NewsFromHackim.java +++ b/src/games/stendhal/server/maps/quests/NewsFromHackim.java @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -172,6 +173,8 @@ public void addToWorld() { "News from Hackim", "Hackim Easso, the Semos blacksmith assistant, needs help to send a message to someone.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); } diff --git a/src/games/stendhal/server/maps/quests/PizzaDelivery.java b/src/games/stendhal/server/maps/quests/PizzaDelivery.java index c42c3e5e43f..a95277333d7 100644 --- a/src/games/stendhal/server/maps/quests/PizzaDelivery.java +++ b/src/games/stendhal/server/maps/quests/PizzaDelivery.java @@ -13,6 +13,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.StendhalQuestSystem; import games.stendhal.server.entity.Outfit; import games.stendhal.server.entity.npc.NPCList; @@ -295,6 +296,8 @@ public DeliverItemQuestBuilder story() { .respondToMissingItem("A pizza? Where?") .npcStatusEffect("pizza"); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/PlinksToy.java b/src/games/stendhal/server/maps/quests/PlinksToy.java index c5bef299490..f9b446b820b 100644 --- a/src/games/stendhal/server/maps/quests/PlinksToy.java +++ b/src/games/stendhal/server/maps/quests/PlinksToy.java @@ -15,6 +15,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.mapstuff.spawner.PassiveEntityRespawnPoint; import games.stendhal.server.entity.npc.NPCList; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -87,6 +88,8 @@ public BringItemQuestBuilder story() { .rewardWith(new IncreaseXPAction(20)) .rewardWith(new IncreaseKarmaAction(10)); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/RestockFlowerShop.java b/src/games/stendhal/server/maps/quests/RestockFlowerShop.java index 0c1672e49bd..7e10ef94b6d 100644 --- a/src/games/stendhal/server/maps/quests/RestockFlowerShop.java +++ b/src/games/stendhal/server/maps/quests/RestockFlowerShop.java @@ -17,6 +17,7 @@ import games.stendhal.common.MathHelper; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -370,6 +371,8 @@ public void addToWorld() { getTitle(), getNPCName() + " needs to restock the flower shop in Nalwor City.", true, 2); + setBaseHOFScore(HOFScore.EASY); + setupBasicResponses(); setupActiveQuestResponses(); prepareRequestingStep(); diff --git a/src/games/stendhal/server/maps/quests/ReverseArrow.java b/src/games/stendhal/server/maps/quests/ReverseArrow.java index 3de1ea83b23..dfe02bda907 100644 --- a/src/games/stendhal/server/maps/quests/ReverseArrow.java +++ b/src/games/stendhal/server/maps/quests/ReverseArrow.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2016 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -28,6 +28,7 @@ import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.core.events.LoginListener; import games.stendhal.server.core.events.TurnListener; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.RPEntity; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.item.token.Token; @@ -530,6 +531,7 @@ public void addToWorld() { "Reverse Arrow", "Gamblos has a fun puzzle to solve.", false); + setBaseHOFScore(HOFScore.EASY); SingletonRepository.getLoginNotifier().addListener(this); diff --git a/src/games/stendhal/server/maps/quests/RingMaker.java b/src/games/stendhal/server/maps/quests/RingMaker.java index 3417e4b8aea..46728f3f42f 100644 --- a/src/games/stendhal/server/maps/quests/RingMaker.java +++ b/src/games/stendhal/server/maps/quests/RingMaker.java @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.RingOfLife; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -216,6 +217,8 @@ public void addToWorld() { "The Ring Maker", "Ognir, the expert on rings, is able to fix broken rings of life.", false); + setBaseHOFScore(HOFScore.EASY); + fixRingStep(npcs.get("Ognir")); } diff --git a/src/games/stendhal/server/maps/quests/SheepGrowing.java b/src/games/stendhal/server/maps/quests/SheepGrowing.java index c8acaeba0a1..3906fd06135 100644 --- a/src/games/stendhal/server/maps/quests/SheepGrowing.java +++ b/src/games/stendhal/server/maps/quests/SheepGrowing.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import games.stendhal.common.Level; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rp.StendhalRPAction; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.creature.Sheep; @@ -84,6 +85,8 @@ public void addToWorld() { "Because he is very busy he needs somebody to take care of " + "one of his sheep and hand it over to Sato.", true); + setBaseHOFScore(HOFScore.EASY); + generalInformationDialogs(); preparePlayerGetsSheepStep(); preparePlayerHandsOverSheepStep(); diff --git a/src/games/stendhal/server/maps/quests/Soup.java b/src/games/stendhal/server/maps/quests/Soup.java index 2b1b54e84e0..d8da461130b 100644 --- a/src/games/stendhal/server/maps/quests/Soup.java +++ b/src/games/stendhal/server/maps/quests/Soup.java @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -402,6 +403,8 @@ public void addToWorld() { "Soup", "Old Mother Helena makes a wonderful vegetable soup.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/SuppliesForPhalk.java b/src/games/stendhal/server/maps/quests/SuppliesForPhalk.java index 39232783445..a8f60a0dceb 100644 --- a/src/games/stendhal/server/maps/quests/SuppliesForPhalk.java +++ b/src/games/stendhal/server/maps/quests/SuppliesForPhalk.java @@ -21,6 +21,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -458,6 +459,8 @@ public void addToWorld() { "Supplies for Phalk", "Phalk, the dwarvish guard in Semos Mine, is in need of supplies.", false); + setBaseHOFScore(HOFScore.EASY); + askForFood(); receiveFood(); getCloak(); diff --git a/src/games/stendhal/server/maps/quests/TakeGoldforGrafindle.java b/src/games/stendhal/server/maps/quests/TakeGoldforGrafindle.java index 26a15ea63cc..5bccdb9b58a 100644 --- a/src/games/stendhal/server/maps/quests/TakeGoldforGrafindle.java +++ b/src/games/stendhal/server/maps/quests/TakeGoldforGrafindle.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2011 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -244,6 +245,8 @@ public void addToWorld() { "Take Gold for Grafindle", "Grafindle in the bank of Nalwor, searches for someone he can trust with gold.", false); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/ThePiedPiper.java b/src/games/stendhal/server/maps/quests/ThePiedPiper.java index e5c92be27c8..a39e8852d02 100644 --- a/src/games/stendhal/server/maps/quests/ThePiedPiper.java +++ b/src/games/stendhal/server/maps/quests/ThePiedPiper.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -22,6 +22,7 @@ import games.stendhal.common.Rand; import games.stendhal.server.core.events.TurnListener; import games.stendhal.server.core.events.TurnNotifier; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.player.Player; import games.stendhal.server.maps.Region; import games.stendhal.server.maps.quests.piedpiper.AwaitingPhase; @@ -257,6 +258,7 @@ public void addToWorld() { "The Pied Piper", "Ados City has a rat problem from time to time.", true); + setBaseHOFScore(HOFScore.EASY); startQuest(); } diff --git a/src/games/stendhal/server/maps/quests/ToysCollector.java b/src/games/stendhal/server/maps/quests/ToysCollector.java index 626f64a65f8..4ea7041546f 100644 --- a/src/games/stendhal/server/maps/quests/ToysCollector.java +++ b/src/games/stendhal/server/maps/quests/ToysCollector.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2011 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -85,6 +86,8 @@ public void addToWorld() { "Toys Collector", "Anna is bored, and searches for toys for her and her friends to play with.", false); + setBaseHOFScore(HOFScore.EASY); + setupAbstractQuest(); specialStuff(); } diff --git a/src/games/stendhal/server/maps/quests/TrapsForKlaas.java b/src/games/stendhal/server/maps/quests/TrapsForKlaas.java index fcaee6c5894..29c68e3da93 100644 --- a/src/games/stendhal/server/maps/quests/TrapsForKlaas.java +++ b/src/games/stendhal/server/maps/quests/TrapsForKlaas.java @@ -15,6 +15,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; @@ -157,6 +158,8 @@ public BringItemQuestBuilder story() { "You lost the note? Well, I could write another one. But it doesn't look like you have room to carry it.", null); + quest.setBaseHOFScore(HOFScore.EASY); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/WaterForXhiphin.java b/src/games/stendhal/server/maps/quests/WaterForXhiphin.java index 0249404178e..7f33cfda50b 100644 --- a/src/games/stendhal/server/maps/quests/WaterForXhiphin.java +++ b/src/games/stendhal/server/maps/quests/WaterForXhiphin.java @@ -19,6 +19,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -236,23 +237,21 @@ private void finishStep() { npc.addReply("Stefan", "Stefan is a chef over in the restaurant at Fado Hotel. I'd trust him to check if anything is safe to eat or drink, he's a professional."); npc.addReply("check", "Sorry, I'm no expert on food or drink myself, try asking #Stefan."); - } - - @Override public void addToWorld() { fillQuestInfo( "Water for Xhiphin Zohos", "Xhiphin Zohos wants some nice fresh water.", true, 2); + setBaseHOFScore(HOFScore.EASY); + requestStep(); checkWaterStep(); finishStep(); } - @Override public List getHistory(final Player player) { final List res = new ArrayList(); diff --git a/src/games/stendhal/server/maps/quests/ZooFood.java b/src/games/stendhal/server/maps/quests/ZooFood.java index 5d56a937f1d..1f920281cb4 100644 --- a/src/games/stendhal/server/maps/quests/ZooFood.java +++ b/src/games/stendhal/server/maps/quests/ZooFood.java @@ -19,6 +19,7 @@ import java.util.Map; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -285,6 +286,8 @@ public void addToWorld() { "Zoo Food", "The animals at the zoo are hungry and need some food!", true); + setBaseHOFScore(HOFScore.EASY); + step_1(); step_2(); step_3(); From c76a636377e2357dfb5260791088c7def7004e16 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Wed, 17 Apr 2024 02:06:05 -0700 Subject: [PATCH 10/11] Set quests with medium scoring --- .../stendhal/server/maps/quests/AmazonPrincess.java | 3 +++ .../server/maps/quests/CleanAthorsUnderground.java | 3 +++ .../stendhal/server/maps/quests/CloakCollector.java | 2 ++ .../stendhal/server/maps/quests/CloaksForBario.java | 11 +++++++---- .../stendhal/server/maps/quests/CollectEnemyData.java | 9 ++++++--- .../server/maps/quests/CrownForTheWannaBeKing.java | 11 +++++++---- src/games/stendhal/server/maps/quests/DragonLair.java | 4 +++- .../stendhal/server/maps/quests/ElfPrincess.java | 3 +++ .../stendhal/server/maps/quests/ElvishArmor.java | 3 +++ .../stendhal/server/maps/quests/EmotionCrystals.java | 5 ++++- src/games/stendhal/server/maps/quests/FindGhosts.java | 5 ++++- .../stendhal/server/maps/quests/FindRatChildren.java | 3 +++ .../stendhal/server/maps/quests/HelpMrsYeti.java | 5 ++++- src/games/stendhal/server/maps/quests/HelpTomi.java | 3 +++ .../stendhal/server/maps/quests/ImperialPrincess.java | 5 ++++- .../stendhal/server/maps/quests/JailedBarbarian.java | 5 ++++- .../stendhal/server/maps/quests/JailedDwarf.java | 3 +++ .../server/maps/quests/KanmararnSoldiers.java | 5 ++++- .../stendhal/server/maps/quests/KillDarkElves.java | 5 ++++- .../server/maps/quests/KillDhohrNuggetcutter.java | 3 +++ src/games/stendhal/server/maps/quests/KillMonks.java | 3 +++ .../stendhal/server/maps/quests/KillSpiders.java | 3 +++ .../stendhal/server/maps/quests/MixtureForOrtiv.java | 3 +++ .../stendhal/server/maps/quests/ObsidianKnife.java | 3 +++ .../stendhal/server/maps/quests/SadScientist.java | 5 ++++- .../stendhal/server/maps/quests/SevenCherubs.java | 5 ++++- src/games/stendhal/server/maps/quests/Snowballs.java | 5 ++++- .../server/maps/quests/SuntanCreamForZara.java | 5 ++++- .../server/maps/quests/UnicornHornsForZelan.java | 3 +++ .../stendhal/server/maps/quests/VampireSword.java | 5 +++++ .../stendhal/server/maps/quests/WeaponsCollector.java | 5 ++++- .../server/maps/quests/WeaponsCollector2.java | 5 ++++- .../server/maps/quests/ZekielsPracticalTestQuest.java | 2 ++ 33 files changed, 123 insertions(+), 25 deletions(-) diff --git a/src/games/stendhal/server/maps/quests/AmazonPrincess.java b/src/games/stendhal/server/maps/quests/AmazonPrincess.java index c078d034a55..b9aa3c54717 100644 --- a/src/games/stendhal/server/maps/quests/AmazonPrincess.java +++ b/src/games/stendhal/server/maps/quests/AmazonPrincess.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipRandomAmountOfItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.InflictStatusOnNPCAction; @@ -92,6 +93,8 @@ public BringItemQuestBuilder story() { .rewardWith(new PlaySoundAction("kiss-female-01")) .rewardWith(new InflictStatusOnNPCAction("pina colada")); + quest.setBaseHOFScore(HOFScore.MEDIUM); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/CleanAthorsUnderground.java b/src/games/stendhal/server/maps/quests/CleanAthorsUnderground.java index cd47a1f1df9..18aa3a1ca34 100644 --- a/src/games/stendhal/server/maps/quests/CleanAthorsUnderground.java +++ b/src/games/stendhal/server/maps/quests/CleanAthorsUnderground.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; @@ -99,6 +100,8 @@ public KillCreaturesQuestBuilder story() { .rewardWith(new IncreaseKarmaAction(10.0)) .rewardWith(new EquipItemAction("greater potion", 10)); + quest.setBaseHOFScore(HOFScore.MEDIUM); + return quest; } diff --git a/src/games/stendhal/server/maps/quests/CloakCollector.java b/src/games/stendhal/server/maps/quests/CloakCollector.java index f3cefa45f20..9c124766d0d 100644 --- a/src/games/stendhal/server/maps/quests/CloakCollector.java +++ b/src/games/stendhal/server/maps/quests/CloakCollector.java @@ -20,6 +20,7 @@ import games.stendhal.common.parser.Expression; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationStates; @@ -85,6 +86,7 @@ public void addToWorld() { "Cloaks Collector", "Josephine wants cloaks in many colors.", false); + setBaseHOFScore(HOFScore.MEDIUM); npcs.get("Josephine").addKnownChatOptions("cloaks"); } diff --git a/src/games/stendhal/server/maps/quests/CloaksForBario.java b/src/games/stendhal/server/maps/quests/CloaksForBario.java index 8ea3b9fb7a2..dc422f8db25 100644 --- a/src/games/stendhal/server/maps/quests/CloaksForBario.java +++ b/src/games/stendhal/server/maps/quests/CloaksForBario.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import games.stendhal.common.MathHelper; import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -217,13 +218,15 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser @Override public void addToWorld() { - step_1(); - step_2(); - step_3(); fillQuestInfo( "Cloaks for Bario", "Bario, the freezing dwarf, needs cloaks to keep himself warm.", false); + setBaseHOFScore(HOFScore.MEDIUM); + + step_1(); + step_2(); + step_3(); } @Override diff --git a/src/games/stendhal/server/maps/quests/CollectEnemyData.java b/src/games/stendhal/server/maps/quests/CollectEnemyData.java index 6ec4444c7d1..bd8732473a1 100644 --- a/src/games/stendhal/server/maps/quests/CollectEnemyData.java +++ b/src/games/stendhal/server/maps/quests/CollectEnemyData.java @@ -29,6 +29,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.creature.Creature; import games.stendhal.server.entity.item.Item; @@ -833,14 +834,16 @@ public String getSlotName() { @Override public void addToWorld() { initNPC(); - initQuest(); - initShop(); - fillQuestInfo( QUEST_NAME, npc.getName() + " wants help collecting data on creatures found around Faimouni.", false); + setBaseHOFScore(HOFScore.MEDIUM); + + initQuest(); + initShop(); } + @Override public boolean removeFromWorld() { final StendhalRPZone currentZone = npc.getZone(); diff --git a/src/games/stendhal/server/maps/quests/CrownForTheWannaBeKing.java b/src/games/stendhal/server/maps/quests/CrownForTheWannaBeKing.java index be6f57b0362..6fbd0c034aa 100644 --- a/src/games/stendhal/server/maps/quests/CrownForTheWannaBeKing.java +++ b/src/games/stendhal/server/maps/quests/CrownForTheWannaBeKing.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import games.stendhal.common.NotificationType; import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -295,13 +296,15 @@ public List getHistory(final Player player) { @Override public void addToWorld() { - step_1(); - step_2(); - step_3(); fillQuestInfo( "Crown for the Wannabe King", NPC_NAME + " wants to rule Kalavan ... and he needs a crown.", false); + setBaseHOFScore(HOFScore.MEDIUM); + + step_1(); + step_2(); + step_3(); } @Override diff --git a/src/games/stendhal/server/maps/quests/DragonLair.java b/src/games/stendhal/server/maps/quests/DragonLair.java index 5793d2dc93b..b2630633c95 100644 --- a/src/games/stendhal/server/maps/quests/DragonLair.java +++ b/src/games/stendhal/server/maps/quests/DragonLair.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -113,12 +114,13 @@ private void step_1() { @Override public void addToWorld() { - step_1(); fillQuestInfo( "Dragon Lair", "Wishman, storm trooper extraordinaire from Blordrough's dark legion, guards the remaining dragons... and lets visitors into their lair.", true); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); } @Override diff --git a/src/games/stendhal/server/maps/quests/ElfPrincess.java b/src/games/stendhal/server/maps/quests/ElfPrincess.java index 2b8d8c7be57..af37cc94a5b 100644 --- a/src/games/stendhal/server/maps/quests/ElfPrincess.java +++ b/src/games/stendhal/server/maps/quests/ElfPrincess.java @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; @@ -279,6 +280,8 @@ public void addToWorld() { "Rhosyd for Elf Princess", "Tywysoga, the Elf Princess in Nalwor Tower, wants to fill her room with precious rhosyds.", false, 2); + setBaseHOFScore(HOFScore.MEDIUM); + offerQuestStep(); getFlowerStep(); bringFlowerStep(); diff --git a/src/games/stendhal/server/maps/quests/ElvishArmor.java b/src/games/stendhal/server/maps/quests/ElvishArmor.java index c780e34ac30..ff271568715 100644 --- a/src/games/stendhal/server/maps/quests/ElvishArmor.java +++ b/src/games/stendhal/server/maps/quests/ElvishArmor.java @@ -16,6 +16,7 @@ import java.util.List; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -85,6 +86,8 @@ public void addToWorld() { "Elvish Armor", "Lupos, an albino elf, wants to get the knowledge of how he can make elvish armor parts himself. Therefore, he asks young travellers to bring him some examples.", true); + setBaseHOFScore(HOFScore.MEDIUM); + offerSteps(); setupAbstractQuest(); } diff --git a/src/games/stendhal/server/maps/quests/EmotionCrystals.java b/src/games/stendhal/server/maps/quests/EmotionCrystals.java index ee21087a8c7..c73a7ff3cd8 100644 --- a/src/games/stendhal/server/maps/quests/EmotionCrystals.java +++ b/src/games/stendhal/server/maps/quests/EmotionCrystals.java @@ -1,5 +1,5 @@ /*************************************************************************** - * (C) Copyright 2003-2013 - Stendhal * + * Copyright © 2003-2024 - Faiumoni e. V. * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -424,6 +425,8 @@ public void addToWorld() { "Emotion Crystals", "Julius needs to get some crystals for his wife which are spread across Faiumoni.", false); + setBaseHOFScore(HOFScore.MEDIUM); + prepareRequestingStep(); prepareRiddlesStep(); prepareBringingStep(); diff --git a/src/games/stendhal/server/maps/quests/FindGhosts.java b/src/games/stendhal/server/maps/quests/FindGhosts.java index d777ee206b3..57082d464af 100644 --- a/src/games/stendhal/server/maps/quests/FindGhosts.java +++ b/src/games/stendhal/server/maps/quests/FindGhosts.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -21,6 +21,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -279,6 +280,8 @@ public void addToWorld() { "Find Ghosts", "Once upon a time, some travellers talked about some spirits which they visited on their way through Faiumoni. One of them, a young ghost called Carena, is hidden somewhere around Ados and needs some help...", true); + setBaseHOFScore(HOFScore.MEDIUM); + askingStep(); findingStep(); tellingStep(); diff --git a/src/games/stendhal/server/maps/quests/FindRatChildren.java b/src/games/stendhal/server/maps/quests/FindRatChildren.java index eafddd8adda..7b43e149a06 100644 --- a/src/games/stendhal/server/maps/quests/FindRatChildren.java +++ b/src/games/stendhal/server/maps/quests/FindRatChildren.java @@ -21,6 +21,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -288,6 +289,8 @@ public void addToWorld() { "Find Rat Children", "Agnus, who lives in Rat City, asks young heroes to find her children and look after them. They went down into the dark tunnels and haven't returned ...", true); + setBaseHOFScore(HOFScore.MEDIUM); + askingStep(); findingStep(); retrievingStep(); diff --git a/src/games/stendhal/server/maps/quests/HelpMrsYeti.java b/src/games/stendhal/server/maps/quests/HelpMrsYeti.java index 0917c1d41c7..5186cc0060c 100644 --- a/src/games/stendhal/server/maps/quests/HelpMrsYeti.java +++ b/src/games/stendhal/server/maps/quests/HelpMrsYeti.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -20,6 +20,7 @@ import org.apache.log4j.Logger; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.creature.Pet; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -341,6 +342,8 @@ public void addToWorld() { "Help Mrs. Yeti", "Mrs. Yeti is really unhappy with her current love life because her husband turned away from her. Now the couple is in deep trouble. Just a special love potion can help Mrs. Yeti to get her husband back.", true); + setBaseHOFScore(HOFScore.MEDIUM); + startQuest(); makePotion(); makeMagicKnife(); diff --git a/src/games/stendhal/server/maps/quests/HelpTomi.java b/src/games/stendhal/server/maps/quests/HelpTomi.java index fbbe108de34..2581165185f 100644 --- a/src/games/stendhal/server/maps/quests/HelpTomi.java +++ b/src/games/stendhal/server/maps/quests/HelpTomi.java @@ -16,6 +16,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -181,6 +182,8 @@ public void addToWorld() { "Help Tomi", "Tomi, a boy being tortured in the hot depths of hell, sweats all over his body. The only thing which can help him is... ICE!", true, null, 1); + setBaseHOFScore(HOFScore.MEDIUM); + questTrigger = ConversationPhrases.combine(ConversationPhrases.QUEST_MESSAGES, extraTrigger); step1(); } diff --git a/src/games/stendhal/server/maps/quests/ImperialPrincess.java b/src/games/stendhal/server/maps/quests/ImperialPrincess.java index 7465adc6714..f726a3c86e9 100644 --- a/src/games/stendhal/server/maps/quests/ImperialPrincess.java +++ b/src/games/stendhal/server/maps/quests/ImperialPrincess.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -18,6 +18,7 @@ import java.util.List; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -315,6 +316,8 @@ public void addToWorld() { "Gaining Citizenship of Kalavan", "To gain official citizenship for Kalavan City, one must first ask for the permission of the King. His daughter, Princess Ylflia, can help gain his ear.", true); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/JailedBarbarian.java b/src/games/stendhal/server/maps/quests/JailedBarbarian.java index fb00999a0dd..a5250d496a4 100644 --- a/src/games/stendhal/server/maps/quests/JailedBarbarian.java +++ b/src/games/stendhal/server/maps/quests/JailedBarbarian.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import org.apache.log4j.Logger; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -297,6 +298,8 @@ public void addToWorld() { "Jailed Barbarian", "Lorenz is a jailed barbarian on Amazon Island. It's a mystery why he is jailed there, but perhaps he needs help.", true); + setBaseHOFScore(HOFScore.MEDIUM); + step1(); step2(); step3(); diff --git a/src/games/stendhal/server/maps/quests/JailedDwarf.java b/src/games/stendhal/server/maps/quests/JailedDwarf.java index 9a8c1c61c47..75a6e17a4af 100644 --- a/src/games/stendhal/server/maps/quests/JailedDwarf.java +++ b/src/games/stendhal/server/maps/quests/JailedDwarf.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -100,6 +101,8 @@ public void addToWorld() { "Jailed Dwarf", "Down in Kanmararn is an afraid dwarf locked in a cell waiting for visitors. He is supposed to be the guard, but duergars have raided the prison. He might need some armor to survive once out of it.", false); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); } diff --git a/src/games/stendhal/server/maps/quests/KanmararnSoldiers.java b/src/games/stendhal/server/maps/quests/KanmararnSoldiers.java index b53692e95fe..b4e581296b4 100644 --- a/src/games/stendhal/server/maps/quests/KanmararnSoldiers.java +++ b/src/games/stendhal/server/maps/quests/KanmararnSoldiers.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -23,6 +23,7 @@ import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.core.events.TurnListener; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.item.Corpse; import games.stendhal.server.entity.item.Item; @@ -462,6 +463,8 @@ public void addToWorld() { "Kanmararn Soldiers", "Some time ago, Sergeant James started with his crew of four brave soldiers on their adventure of finding a treasure in Kanmararn, the city of dwarves. They didn't return yet.", true); + setBaseHOFScore(HOFScore.MEDIUM); + prepareCowardSoldier(); prepareCorpses(); prepareSergeant(); diff --git a/src/games/stendhal/server/maps/quests/KillDarkElves.java b/src/games/stendhal/server/maps/quests/KillDarkElves.java index dc2d3b6f35c..e07d1f19b52 100644 --- a/src/games/stendhal/server/maps/quests/KillDarkElves.java +++ b/src/games/stendhal/server/maps/quests/KillDarkElves.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -242,6 +243,8 @@ public void addToWorld() { "Kill Dark Elves", "Maerion, leader of elves, wants to kill dark elves in the secret room to hide his plots and get back his amulet.", false); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/KillDhohrNuggetcutter.java b/src/games/stendhal/server/maps/quests/KillDhohrNuggetcutter.java index 3b395017f7d..7b910b9cc64 100644 --- a/src/games/stendhal/server/maps/quests/KillDhohrNuggetcutter.java +++ b/src/games/stendhal/server/maps/quests/KillDhohrNuggetcutter.java @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -180,6 +181,8 @@ public void addToWorld() { "Kill Dhohr Nuggetcutter", "Zogfang, the orc who guards the entrance of the Abandoned Keep, isn't feeling safe while some dwarves still remain in the Keep.", false); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/KillMonks.java b/src/games/stendhal/server/maps/quests/KillMonks.java index 27b3b3ea035..e2019792361 100644 --- a/src/games/stendhal/server/maps/quests/KillMonks.java +++ b/src/games/stendhal/server/maps/quests/KillMonks.java @@ -21,6 +21,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -200,6 +201,8 @@ public void addToWorld() { "Kill Monks", "Andy's wife was killed by monks, now he wants revenge on them.", false, 2); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/KillSpiders.java b/src/games/stendhal/server/maps/quests/KillSpiders.java index 44dc71e82ea..b64a6d26731 100644 --- a/src/games/stendhal/server/maps/quests/KillSpiders.java +++ b/src/games/stendhal/server/maps/quests/KillSpiders.java @@ -17,6 +17,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -189,6 +190,8 @@ public void addToWorld() { "Kill Spiders", "Morgrin, groundskeeper of the magic school, is concerned about spiders in the school basement.", true); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/MixtureForOrtiv.java b/src/games/stendhal/server/maps/quests/MixtureForOrtiv.java index a021ca70b8d..6a63fa272c9 100644 --- a/src/games/stendhal/server/maps/quests/MixtureForOrtiv.java +++ b/src/games/stendhal/server/maps/quests/MixtureForOrtiv.java @@ -18,6 +18,7 @@ import java.util.Map; import games.stendhal.common.grammar.Grammar; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -253,6 +254,8 @@ public void addToWorld() { "Mixture for Ortiv", "Ortiv needs some ingredients for a mixture which will help him to keep the assassins and bandits in the cellar.", true); + setBaseHOFScore(HOFScore.MEDIUM); + prepareRequestingStep(); prepareBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/ObsidianKnife.java b/src/games/stendhal/server/maps/quests/ObsidianKnife.java index 0aa9eca9e68..9de2373170d 100644 --- a/src/games/stendhal/server/maps/quests/ObsidianKnife.java +++ b/src/games/stendhal/server/maps/quests/ObsidianKnife.java @@ -22,6 +22,7 @@ import games.stendhal.common.Rand; import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ChatCondition; @@ -522,6 +523,8 @@ public void addToWorld() { "Obsidian Knife", "A skilled dwarf blacksmith in Wo'fol is getting hungry, and bored...", false); + setBaseHOFScore(HOFScore.MEDIUM); + prepareQuestOfferingStep(); bringFoodStep(); requestBookStep(); diff --git a/src/games/stendhal/server/maps/quests/SadScientist.java b/src/games/stendhal/server/maps/quests/SadScientist.java index 825db387fa2..fd75bc3f140 100644 --- a/src/games/stendhal/server/maps/quests/SadScientist.java +++ b/src/games/stendhal/server/maps/quests/SadScientist.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -22,6 +22,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ChatCondition; @@ -178,6 +179,8 @@ public void addToWorld() { "A Sad Scientist", "Vasi Elos, a lonely scientist, wants to deliver a present to his honey.", false); + setBaseHOFScore(HOFScore.MEDIUM); + prepareQuestSteps(); } diff --git a/src/games/stendhal/server/maps/quests/SevenCherubs.java b/src/games/stendhal/server/maps/quests/SevenCherubs.java index c64a66650fd..8eede8106e6 100644 --- a/src/games/stendhal/server/maps/quests/SevenCherubs.java +++ b/src/games/stendhal/server/maps/quests/SevenCherubs.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -25,6 +25,7 @@ import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.core.pathfinder.FixedPath; import games.stendhal.server.core.pathfinder.Node; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -235,6 +236,8 @@ public void addToWorld() { "Seven Cherubs", "Seven cherubs stay on this world, and finding them all is rewarded with a prize.", false); + setBaseHOFScore(HOFScore.MEDIUM); + StendhalRPZone zone; SpeakerNPC npc; diff --git a/src/games/stendhal/server/maps/quests/Snowballs.java b/src/games/stendhal/server/maps/quests/Snowballs.java index 05fa406d414..c1a35de0bf4 100644 --- a/src/games/stendhal/server/maps/quests/Snowballs.java +++ b/src/games/stendhal/server/maps/quests/Snowballs.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -19,6 +19,7 @@ import games.stendhal.common.Rand; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.StackableItem; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -273,6 +274,8 @@ public void addToWorld() { "Snowballs for Mr. Yeti", "The inhabitant of the icy region in Faiumoni needs your help to collect some snowballs for him.", false); + setBaseHOFScore(HOFScore.MEDIUM); + prepareRequestingStep(); prepareBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/SuntanCreamForZara.java b/src/games/stendhal/server/maps/quests/SuntanCreamForZara.java index 57650ec5358..5e93bc2a6fd 100644 --- a/src/games/stendhal/server/maps/quests/SuntanCreamForZara.java +++ b/src/games/stendhal/server/maps/quests/SuntanCreamForZara.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import java.util.LinkedList; import java.util.List; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; @@ -215,6 +216,8 @@ public void addToWorld() { "Suntan Cream for Zara", "Zara is burning under the hot Athor sun.", false); + setBaseHOFScore(HOFScore.MEDIUM); + createRequestingStep(); createBringingStep(); } diff --git a/src/games/stendhal/server/maps/quests/UnicornHornsForZelan.java b/src/games/stendhal/server/maps/quests/UnicornHornsForZelan.java index b382a37293c..8b61f6e6634 100644 --- a/src/games/stendhal/server/maps/quests/UnicornHornsForZelan.java +++ b/src/games/stendhal/server/maps/quests/UnicornHornsForZelan.java @@ -11,6 +11,7 @@ ***************************************************************************/ package games.stendhal.server.maps.quests; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.action.EquipItemAction; import games.stendhal.server.entity.npc.action.IncreaseKarmaAction; import games.stendhal.server.entity.npc.action.IncreaseXPAction; @@ -99,6 +100,8 @@ public BringItemQuestBuilder story() { .rewardWith(new EquipItemAction("soup", 3)) .rewardWith(new EquipItemAction("money", 20000)); + quest.setBaseHOFScore(HOFScore.MEDIUM); + return quest; } } diff --git a/src/games/stendhal/server/maps/quests/VampireSword.java b/src/games/stendhal/server/maps/quests/VampireSword.java index e7eca0de79c..a127fe0dced 100644 --- a/src/games/stendhal/server/maps/quests/VampireSword.java +++ b/src/games/stendhal/server/maps/quests/VampireSword.java @@ -39,6 +39,7 @@ import java.util.Map; import java.util.TreeMap; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -46,6 +47,8 @@ import games.stendhal.server.entity.npc.behaviour.impl.ProducerBehaviour; import games.stendhal.server.entity.player.Player; import games.stendhal.server.maps.Region; + + /** * QUEST: The Vampire Sword *

@@ -297,6 +300,8 @@ public void addToWorld() { "Vampire Sword", "Hogart tells a thrilling story of vampires and betrayal. This inspires the idea of a life stealing sword he can forge.", false); + setBaseHOFScore(HOFScore.MEDIUM); + prepareQuestOfferingStep(); prepareGobletFillingStep(); prepareForgingStep(); diff --git a/src/games/stendhal/server/maps/quests/WeaponsCollector.java b/src/games/stendhal/server/maps/quests/WeaponsCollector.java index 4658ef8c018..ed7131e6984 100644 --- a/src/games/stendhal/server/maps/quests/WeaponsCollector.java +++ b/src/games/stendhal/server/maps/quests/WeaponsCollector.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2010 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -17,6 +17,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -73,6 +74,8 @@ public void addToWorld() { "Weapon Collector", "Balduin, the hermit who is living on Ados rock, wants to expand his weapons collection.", true); + setBaseHOFScore(HOFScore.MEDIUM); + setupAbstractQuest(); } diff --git a/src/games/stendhal/server/maps/quests/WeaponsCollector2.java b/src/games/stendhal/server/maps/quests/WeaponsCollector2.java index 6872e54bcd1..80e3596dedd 100644 --- a/src/games/stendhal/server/maps/quests/WeaponsCollector2.java +++ b/src/games/stendhal/server/maps/quests/WeaponsCollector2.java @@ -1,6 +1,6 @@ /* $Id$ */ /*************************************************************************** - * (C) Copyright 2003-2023 - Stendhal * + * (C) Copyright 2003-2024 - Stendhal * *************************************************************************** *************************************************************************** * * @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -307,6 +308,8 @@ public void addToWorld() { "Weapon Collector 2", "Balduin, the hermit who is living on Ados rock, has heard of more weapons he can collect.", true); + setBaseHOFScore(HOFScore.MEDIUM); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/ZekielsPracticalTestQuest.java b/src/games/stendhal/server/maps/quests/ZekielsPracticalTestQuest.java index ab26a013951..f9cd58e1702 100644 --- a/src/games/stendhal/server/maps/quests/ZekielsPracticalTestQuest.java +++ b/src/games/stendhal/server/maps/quests/ZekielsPracticalTestQuest.java @@ -17,6 +17,7 @@ import java.util.List; import games.stendhal.common.Direction; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; @@ -342,6 +343,7 @@ public void addToWorld() { "Zekiels Practical Test", "Zekiel, the guardian of the magic tower, knows all about the wizards domain and history.", true); + setBaseHOFScore(HOFScore.MEDIUM); prepareQuestOfferingStep(); bringItemsStep(); From d378b03b5a0bff5a3e765c8db980aa86c38d8c38 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Wed, 17 Apr 2024 02:26:12 -0700 Subject: [PATCH 11/11] Set quests with hard scoring --- .../stendhal/server/maps/quests/CloakCollector2.java | 10 +++++++--- .../stendhal/server/maps/quests/MithrilCloak.java | 2 ++ .../stendhal/server/maps/quests/StuffForBaldemar.java | 3 +++ .../stendhal/server/maps/quests/UltimateCollector.java | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/games/stendhal/server/maps/quests/CloakCollector2.java b/src/games/stendhal/server/maps/quests/CloakCollector2.java index 6cdc2d519e3..1af55f16822 100644 --- a/src/games/stendhal/server/maps/quests/CloakCollector2.java +++ b/src/games/stendhal/server/maps/quests/CloakCollector2.java @@ -22,6 +22,7 @@ import games.stendhal.common.parser.Expression; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; @@ -76,6 +77,7 @@ public class CloakCollector2 extends AbstractQuest { public String getSlotName() { return QUEST_SLOT; } + /** * Returns a list of the names of all cloaks that the given player still has * to bring to fulfill the quest. @@ -371,13 +373,15 @@ public boolean fire(final Player player, final Sentence sentence, final Entity e @Override public void addToWorld() { - step_1(); - step_2(); - step_3(); fillQuestInfo( "Cloaks Collector part 2", "Josephine wants even more cloaks!", false); + setBaseHOFScore(HOFScore.HARD); + + step_1(); + step_2(); + step_3(); } private static void rewardPlayer(final Player player) { diff --git a/src/games/stendhal/server/maps/quests/MithrilCloak.java b/src/games/stendhal/server/maps/quests/MithrilCloak.java index 805d36a36e7..a72c61cdcd4 100644 --- a/src/games/stendhal/server/maps/quests/MithrilCloak.java +++ b/src/games/stendhal/server/maps/quests/MithrilCloak.java @@ -20,6 +20,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.core.events.LoginListener; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.scroll.TwilightMossScroll; import games.stendhal.server.entity.player.Player; import games.stendhal.server.maps.Region; @@ -95,6 +96,7 @@ public void addToWorld() { "Mithril Cloak", "A shiny and high defense cloak is available for those willing to complete a long list of tasks for the seamstress Ida.", false); + setBaseHOFScore(HOFScore.HARD); // login notifier to teleport away players logging into the twilight zone. SingletonRepository.getLoginNotifier().addListener(new LoginListener() { diff --git a/src/games/stendhal/server/maps/quests/StuffForBaldemar.java b/src/games/stendhal/server/maps/quests/StuffForBaldemar.java index 5d9a160712f..4ee79dcc45c 100644 --- a/src/games/stendhal/server/maps/quests/StuffForBaldemar.java +++ b/src/games/stendhal/server/maps/quests/StuffForBaldemar.java @@ -18,6 +18,7 @@ import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; import games.stendhal.server.entity.npc.ConversationPhrases; @@ -250,6 +251,8 @@ public void addToWorld() { "Stuff for Baldemar", "Baldemar, a friendly mithrilbourgh elite wizard, will forge a special shield.", false); + setBaseHOFScore(HOFScore.HARD); + step_1(); step_2(); step_3(); diff --git a/src/games/stendhal/server/maps/quests/UltimateCollector.java b/src/games/stendhal/server/maps/quests/UltimateCollector.java index b5ba911e907..9c7e52efad2 100644 --- a/src/games/stendhal/server/maps/quests/UltimateCollector.java +++ b/src/games/stendhal/server/maps/quests/UltimateCollector.java @@ -23,6 +23,7 @@ import games.stendhal.common.grammar.Grammar; import games.stendhal.common.parser.Sentence; import games.stendhal.server.core.engine.SingletonRepository; +import games.stendhal.server.core.rp.HOFScore; import games.stendhal.server.core.rule.EntityManager; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ChatAction; @@ -536,6 +537,7 @@ public void addToWorld() { "Ultimate Weapon Collector", "Balduin, the hermit who is living on Ados rock, has a last and ultimate challenge for collectors.", true); + setBaseHOFScore(HOFScore.HARD); checkCollectingQuests(); requestItem();