forked from MagicBane/Server
32 lines
733 B
Java
32 lines
733 B
Java
|
|
package engine.QuestSystem;
|
||
|
|
|
||
|
|
import engine.objects.ItemBase;
|
||
|
|
import engine.objects.NPC;
|
||
|
|
import engine.objects.PlayerCharacter;
|
||
|
|
|
||
|
|
import java.util.ArrayList;
|
||
|
|
|
||
|
|
public class QuestObject {
|
||
|
|
|
||
|
|
public String QuestName;
|
||
|
|
public String description;
|
||
|
|
public int objectiveCount;
|
||
|
|
public int objectiveCountRequired;
|
||
|
|
public ArrayList<String> progressionNames;
|
||
|
|
public PlayerCharacter owner;
|
||
|
|
|
||
|
|
public QuestObject(){
|
||
|
|
|
||
|
|
}
|
||
|
|
public void tryProgress(String option){
|
||
|
|
if(this.progressionNames.contains(option))
|
||
|
|
this.objectiveCount++;
|
||
|
|
else
|
||
|
|
return;
|
||
|
|
|
||
|
|
if(this.objectiveCount >= this.objectiveCountRequired){
|
||
|
|
QuestManager.completeQuest(this.owner,this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|