Major refactor part 1.
This commit is contained in:
@@ -74,11 +74,28 @@ void cleanup_unicorn_adventure() {
|
||||
void run_unicorn_adventure() {
|
||||
// Stop main game sounds
|
||||
p.destroy_all();
|
||||
|
||||
|
||||
init_unicorn_adventure();
|
||||
|
||||
speak_with_history("You enter a mountain pass. A massive Unicorn blocks the path! A wooden bridge spans a chasm ahead.", true);
|
||||
|
||||
|
||||
// Show introduction in text reader
|
||||
string[] intro;
|
||||
intro.insert_last("=== Unicorn Hunt ===");
|
||||
intro.insert_last("");
|
||||
intro.insert_last("You enter a narrow mountain pass. A massive Unicorn blocks your path!");
|
||||
intro.insert_last("The beast charges back and forth relentlessly.");
|
||||
intro.insert_last("");
|
||||
intro.insert_last("A wooden bridge spans a deep chasm ahead. The bridge has two supports");
|
||||
intro.insert_last("that can be destroyed with an axe.");
|
||||
intro.insert_last("");
|
||||
intro.insert_last("Strategy:");
|
||||
intro.insert_last(" - Use your axe to destroy a bridge support");
|
||||
intro.insert_last(" - Lure the Unicorn onto the bridge");
|
||||
intro.insert_last(" - Jump (UP arrow) to avoid being trampled");
|
||||
intro.insert_last(" - When the bridge collapses with the Unicorn on it, you win!");
|
||||
intro.insert_last("");
|
||||
intro.insert_last("Controls: LEFT/RIGHT to move, UP to jump, CTRL to attack, ESC to flee");
|
||||
text_reader_lines(intro, "Adventure", true);
|
||||
|
||||
// Adventure Loop
|
||||
while (true) {
|
||||
wait(5);
|
||||
@@ -392,6 +409,7 @@ void play_unicorn_death_sequence() {
|
||||
p.destroy_sound(fall_handle);
|
||||
}
|
||||
play_1d_with_volume_step("sounds/bosses/unicorn/unicorn_falls.ogg", player_arena_x, unicorn.x, false, UNICORN_SOUND_VOLUME_STEP);
|
||||
wait(1500); // Let the impact sound play before cleanup
|
||||
}
|
||||
|
||||
void give_unicorn_rewards() {
|
||||
|
||||
Reference in New Issue
Block a user