maxcurrent420 / BeastBreeder

0 stars 0 forks source link

Implement createQuest method in NPC class and update Quest class structure #58

Closed codeautopilot[bot] closed 3 months ago

codeautopilot[bot] commented 8 months ago

Resolves #57

This PR adds a createQuest method to the NPC class for instantiating Quest objects. It also updates the Quest class to ensure it can be properly instantiated with all required properties, including default tasks as an empty array and additional attributes for quest progress and status.

codeautopilot[bot] commented 8 months ago

PR summary

The Pull Request introduces a new method createQuest in the NPC class, which allows for the creation and assignment of Quest objects to players. It also refactors the Quest class by adding a description property during instantiation, initializing progress and completion status, and providing methods to set the description and mark the quest as started. The PR aims to resolve an issue with quest creation and assignment, ensuring that quests have all necessary properties and can be tracked from initiation to completion.

Suggestion

The PR seems to streamline the quest creation process and makes the Quest class more robust. However, it might be beneficial to ensure that the createQuest method includes validation to prevent the creation of quests with invalid or incomplete data. Additionally, the assignQuest method could be updated to check if the quest is already assigned to a player to avoid duplicates in the player's quest list.