implement challenge stage unlocks

This commit is contained in:
Martin Michelsen
2024-01-14 09:47:03 -08:00
parent 02e8f8ea8b
commit c15e154846
19 changed files with 162 additions and 25 deletions
+14
View File
@@ -17,6 +17,7 @@ class QuestAvailabilityExpression {
public:
struct Env {
const QuestFlagsForDifficulty* flags;
const PlayerRecordsBB_Challenge* challenge_records;
std::shared_ptr<const TeamIndex::Team> team;
size_t num_players;
};
@@ -115,6 +116,19 @@ protected:
uint16_t flag_index;
};
class ChallengeCompletionLookupNode : public Node {
public:
ChallengeCompletionLookupNode(Episode episode, uint8_t stage_index);
virtual ~ChallengeCompletionLookupNode() = default;
virtual bool operator==(const Node& other) const;
virtual int64_t evaluate(const Env& env) const;
virtual std::string str() const;
protected:
Episode episode;
uint8_t stage_index;
};
class TeamRewardLookupNode : public Node {
public:
TeamRewardLookupNode(const std::string& reward_name);