A couple more quests added.

This commit is contained in:
Storm Dragon
2026-02-05 03:06:25 -05:00
parent a8ab10b31a
commit 11c64625cc
6 changed files with 278 additions and 4 deletions

View File

@@ -1,20 +1,26 @@
// Quest system
#include "src/quests/bat_invasion_game.nvgt"
#include "src/quests/catch_the_boomerang_game.nvgt"
#include "src/quests/enchanted_melody_game.nvgt"
#include "src/quests/escape_from_hel_game.nvgt"
#include "src/quests/skeletal_bard_game.nvgt"
const int QUEST_BAT_INVASION = 0;
const int QUEST_ENCHANTED_MELODY = 1;
const int QUEST_ESCAPE_FROM_HEL = 2;
const int QUEST_TYPE_COUNT = 3;
const int QUEST_CATCH_BOOMERANG = 1;
const int QUEST_ENCHANTED_MELODY = 2;
const int QUEST_ESCAPE_FROM_HEL = 3;
const int QUEST_SKELETAL_BARD = 4;
const int QUEST_TYPE_COUNT = 5;
int[] quest_queue;
bool quest_roll_done_today = false;
string get_quest_name(int quest_type) {
if (quest_type == QUEST_BAT_INVASION) return "Bat Invasion";
if (quest_type == QUEST_CATCH_BOOMERANG) return "Catch the Boomerang";
if (quest_type == QUEST_ENCHANTED_MELODY) return "Enchanted Melody";
if (quest_type == QUEST_ESCAPE_FROM_HEL) return "Escape from Hel";
if (quest_type == QUEST_SKELETAL_BARD) return "Skeletal Bard";
return "Unknown Quest";
}
@@ -22,12 +28,18 @@ string get_quest_description(int quest_type) {
if (quest_type == QUEST_BAT_INVASION) {
return "Bat Invasion. Giant killer bats are attacking. Press space to throw when the bat is centered.";
}
if (quest_type == QUEST_CATCH_BOOMERANG) {
return "Catch the Boomerang. Throw and catch the boomerang as it returns for up to 4 points.";
}
if (quest_type == QUEST_ENCHANTED_MELODY) {
return "Enchanted Melody. Repeat the pattern using E R D F or U I J K. Lowest to highest pitch.";
}
if (quest_type == QUEST_ESCAPE_FROM_HEL) {
return "Escape from Hel. Press space to jump over open graves. The pace quickens.";
}
if (quest_type == QUEST_SKELETAL_BARD) {
return "Skeletal Bard. A skeleton named Billy Bones is practicing to become a bard. Count the notes.";
}
return "Unknown quest.";
}
@@ -38,6 +50,14 @@ int get_quest_chance_from_favor() {
return chance;
}
void quest_menu_background_tick() {
menu_background_tick();
}
void quest_boomerang_hit_sound() {
play_player_damage_sound();
}
void add_quest(int quest_type) {
if (quest_queue.length() >= QUEST_MAX_ACTIVE) return;
quest_queue.insert_last(quest_type);
@@ -139,8 +159,10 @@ void run_quest(int quest_type) {
p.pause_all();
int score = 0;
if (quest_type == QUEST_BAT_INVASION) score = run_bat_invasion();
else if (quest_type == QUEST_CATCH_BOOMERANG) score = run_catch_the_boomerang();
else if (quest_type == QUEST_ENCHANTED_MELODY) score = run_enchanted_melody();
else if (quest_type == QUEST_ESCAPE_FROM_HEL) score = run_escape_from_hel();
else if (quest_type == QUEST_SKELETAL_BARD) score = run_skeletal_bard();
apply_quest_reward(score);
p.resume_all();
}