Quest System
This commit is contained in:
1 parent
9ec95b974f
commit
da42e2baf4
5 files changed
+183
-11
No files matched your search
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user