Boomerang quest updated.
This commit is contained in:
@@ -432,11 +432,10 @@ void run_game()
|
||||
{
|
||||
int old_x = x;
|
||||
|
||||
// Check if trying to move left/right while in tree (not in mountain)
|
||||
MountainRange@ current_mountain = get_mountain_at(x);
|
||||
// Check if trying to move left/right while in a tree.
|
||||
Tree@ current_tree = get_tree_at(x);
|
||||
int ground_elevation = get_mountain_elevation_at(x);
|
||||
if((left_active || right_active) && y > ground_elevation && !jumping && !falling && !rope_climbing && current_mountain is null && current_tree !is null) {
|
||||
if((left_active || right_active) && y > ground_elevation && !jumping && !falling && !rope_climbing && current_tree !is null) {
|
||||
// Fall out of tree
|
||||
climbing = false;
|
||||
start_falling();
|
||||
|
||||
@@ -42,6 +42,7 @@ int run_catch_the_boomerang() {
|
||||
int boomerangY = -2;
|
||||
bool returning = false;
|
||||
bool resolved = false;
|
||||
bool catchWindowPromptPlayed = false;
|
||||
int stepDelay = random(180, 280);
|
||||
int stepSize = 2;
|
||||
|
||||
@@ -51,6 +52,11 @@ int run_catch_the_boomerang() {
|
||||
|
||||
p.play_2d(boomerangSound, 0.0, 0.0, 0.0, boomerangY, false);
|
||||
|
||||
if (!catchWindowPromptPlayed && returning && boomerangY > -5) {
|
||||
p.play_stationary("sounds/quests/safe_to_jump.ogg", false);
|
||||
catchWindowPromptPlayed = true;
|
||||
}
|
||||
|
||||
if (key_pressed(KEY_SPACE)) {
|
||||
if (returning && boomerangY > -5) {
|
||||
int points = 5 + boomerangY;
|
||||
@@ -74,7 +80,8 @@ int run_catch_the_boomerang() {
|
||||
|
||||
boomerangY += returning ? stepSize : -stepSize;
|
||||
|
||||
if (boomerangY >= 0) {
|
||||
// Give one centered pass (y == 0) as a final catch window.
|
||||
if (boomerangY > 0) {
|
||||
string promptSuffix = (turn < turnsTotal - 1) ? " Press Space to throw." : "";
|
||||
speak_with_history("The boomerang hit you." + promptSuffix, true);
|
||||
quest_boomerang_hit_sound();
|
||||
|
||||
Reference in New Issue
Block a user