turnofflayers("DEBUG"); turnofflayers("NPC"); visible = true; con = 0; timer = 0; init = 0; foxflag = 1840; pink_fox = -4; bullet_flip = 0; PROGRESS_FLAG = 1737; _FOX_BIT_1 = 1; _FOX_BIT_2 = 2; _FOX_BIT_3 = 3; _FOX_BIT_4 = 4; _FOX_BIT_5 = 5; _AQUA_BEATEN_BIT = 7; _DOOR_OPEN_BIT = 8; _TERA_SKIP_BIT = 9; _PUSH_OFF_BIT = 7; reset_tera_skip_bit = false; falling_fox = -4; door_is_open = scr_flag_get_ext(PROGRESS_FLAG, _DOOR_OPEN_BIT); npc_rudinn = -4; foxgarden = -4; set_teraskip = false; foxes_counted = 0; encountercon = 0; laughing_fox = -4; last_tail_message = -1; currentmsg = -1; global.flag[20] = 0; hiding_fox = -4; foxgloves_layer = layer_get_id("FOXGLOVES"); foxgloves_layer_exists = layer_exists(foxgloves_layer); foxglove_start_x = []; foxglove_start_y = []; foxglove_elements = []; foxglove_count = 0; if (foxgloves_layer_exists) { var fg = layer_get_all_elements(foxgloves_layer); var fg_num = array_length(fg); for (var i = 0; i < fg_num; i++) { var elem = fg[i]; if (layer_get_element_type(elem) == 4) { array_push(foxglove_elements, elem); foxglove_count++; foxglove_start_x[i] = layer_sprite_get_x(elem); foxglove_start_y[i] = layer_sprite_get_y(elem); } } } turnofflayers("DWCR04"); cutscene = 0; cutInit = 0; plot_check_on = true; plot_post = 40; plot_flag = 1455; cutready = 0; cutscene = -1; ctimer = 0; if (global.flag[plot_flag] < plot_post) cutscene = 0; collect_fox = function(arg0 = -1) { foxes_counted++; snd_play(snd_barrel_jump); with (instance_create(mean(obj_mainchara.bbox_left, obj_mainchara.bbox_right), obj_mainchara.bbox_top - 20, obj_marker)) { sprite_index = spr_fcastle_foxhunt_popup; scr_darksize(); vspeed = -10; friction = 0.95; scr_doom(self, 120); } if (arg0 > 0) scr_flag_set_ext(PROGRESS_FLAG, arg0, 1); unlock_door(); }; unlock_door = function() { var sum = scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_1) + scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_2) + scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_3) + scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_4) + scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_5); if (sum == 5) { with (obj_fusuma_door) can_open = true; } else { } foxes_counted = sum; var spr = findsprite(spr_dw_fcastle_foxsign); layer_sprite_index(spr, sum); }; myinteract = 0; yellow_con = 0; yellow_timer = 0; npc_shadowguy = -4; fusuma_interact = -4; door_interact = -4; num_terakota_pushed_since_fox = 0; myinteract = 0; mydialoguer = -4; on_terakota_push_off = function(arg0) { if (scr_flag_get_ext(PROGRESS_FLAG, 4) == 1) { num_terakota_pushed_since_fox++; if (global.interact == 0) { var flag = scr_flag_get_ext(PROGRESS_FLAG, _PUSH_OFF_BIT, 2); if (get_remaining_terakota() == 0) { if (arg0) { scr_speaker("susie"); msgsetloc(0, "\\EK* Man^1, that was stupid./", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_153_0"); msgnextloc("\\EC* Can't believe you have to push 'em all off./", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_154_0"); scr_anyface_next("ralsei", "y"); msgnextloc("\\Ey* Yea.../%", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_156_0"); mydialoguer = d_make(); global.interact = 1; myinteract = 3; } else if (num_terakota_pushed_since_fox > 1 && flag < 3) { global.choicemsg[0] = stringsetloc("Yea...", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_162_0"); global.choicemsg[1] = stringsetloc("I WAS#SERIOUS#!!!!!!!!#!!!!!!!!", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_163_0"); global.choicemsg[2] = stringset(""); global.choicemsg[3] = stringset(""); global.msc = -99; global.choice = -1; scr_speaker("ralsei"); msgsetloc(0, "\\EH* Great job^1, Kris^1! You did it!/", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_171_0"); msgnextloc("\\EK* Did you^1, um^1, have fun?/", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_172_0"); msgnext("\\C2"); mydialoguer = d_make(); global.interact = 1; myinteract = 4; scr_flag_set_ext(PROGRESS_FLAG, _PUSH_OFF_BIT, 3, 2); } } else if (num_terakota_pushed_since_fox == 4 && flag < 1) { scr_speaker("ralsei"); msgsetloc(0, "\\EJ* Umm^1, Kris^1? Just a hunch^1, but..^1. I don't think.../", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_182_0"); msgnextloc("\\EM* Pushing statues off the ledge in this room.../", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_183_0"); msgnextloc("\\EK* ..^1. will do anything else./%", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_184_0"); mydialoguer = d_make(); global.interact = 1; myinteract = 3; scr_flag_set_ext(PROGRESS_FLAG, _PUSH_OFF_BIT, 1, 2); } else if (num_terakota_pushed_since_fox == 10 && flag < 2) { scr_speaker("ralsei"); msgsetloc(0, "\\EK* (K-Kris looks like they're having fun^1, so...)/%", "obj_dw_fcastle_foxhunt_slash_Create_0_gml_191_0"); mydialoguer = d_make(); global.interact = 1; myinteract = 3; scr_flag_set_ext(PROGRESS_FLAG, _PUSH_OFF_BIT, 2, 2); } } } }; get_remaining_terakota = function() { var remaining = 0; with (obj_terracotta_stationary_overworld) { if (con == -2) continue; if (attack_pattern != -1) continue; if (extflag == "push_off_ignore") continue; if (extflag == "farpush") continue; remaining++; } return remaining; };