Quests
Every quest is composed of a description and it’s steps following the currencies/items/experience as rewards.
Quest steps
The quests don’t have a conclusion order, it’s possible to finish them in any order. Create a quest using:
new gg.class.Quest({
text: 'Kill something',
steps: [{
text: 'An orc',
reward: new gg.class.Experience({
value: 10
})
}]
})
Rewards
For the character get the rewards from the quest, claimReward
can be used:
hero.interact(quest).claimReward()
// <- Promise
The character will gain the experience. If the reward is a item, it goes to his inventory.