-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin creating quest An Old Man's wish
- Loading branch information
1 parent
835b84f
commit 0d2e7fb
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/*************************************************************************** | ||
* Copyright © 2003-2022 - Arianne * | ||
*************************************************************************** | ||
*************************************************************************** | ||
* * | ||
* 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.maps.quests; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import games.stendhal.server.entity.npc.ConversationPhrases; | ||
import games.stendhal.server.entity.npc.ConversationStates; | ||
import games.stendhal.server.entity.npc.SpeakerNPC; | ||
import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition; | ||
import games.stendhal.server.entity.player.Player; | ||
import games.stendhal.server.maps.Region; | ||
|
||
public class AnOldMansWish extends AbstractQuest { | ||
|
||
public static final String QUEST_SLOT = "an_old_mans_wish"; | ||
|
||
private final SpeakerNPC elias = npcs.get("Elias Breland"); | ||
|
||
|
||
@Override | ||
public String getSlotName() { | ||
return QUEST_SLOT; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "AnOldMansWish"; | ||
} | ||
|
||
@Override | ||
public String getRegion() { | ||
return Region.DENIRAN; | ||
} | ||
|
||
@Override | ||
public String getNPCName() { | ||
return elias.getName(); | ||
} | ||
|
||
@Override | ||
public List<String> getHistory(final Player player) { | ||
final List<String> res = new ArrayList<>(); | ||
return res; | ||
} | ||
|
||
@Override | ||
public void addToWorld() { | ||
fillQuestInfo( | ||
"An Old Man's Wish", | ||
elias.getName() + " is grieved over the loss of his grandson.", | ||
false | ||
); | ||
prepareRequestStep(); | ||
prepareCompleteStep(); | ||
} | ||
|
||
private void prepareRequestStep() { | ||
elias.add( | ||
ConversationStates.ATTENDING, | ||
ConversationPhrases.QUEST_MESSAGES, | ||
new QuestNotStartedCondition(QUEST_SLOT), | ||
ConversationStates.QUEST_OFFERED, | ||
"My grandson disappeared a year ago. I fear the worst and have" | ||
+ " nearly given up all hope. What I would give to just" | ||
+ " know what happened to him! If you learn anything will" | ||
+ " you bring me the news?", | ||
null); | ||
} | ||
|
||
private void prepareCompleteStep() { | ||
} | ||
} |