static void jets_level_up (void) { timer_restart_free (GID_JETS_LEVEL_UP, TIME_2S); jets_scored = 1; bounded_increment (jets_bonus_level, 50); if (jets_for_bonus <= 195) jets_for_bonus += 5; award_unlit_shot (SW_BOTTOM_JET); /* jetscore is used rather than score_deff_get * because it's likely another score woud of * happened */ if (jets_bonus_level < 3) { score (SC_1M); jetscore = 1; } else if (jets_bonus_level < 5) { score (SC_5M); jetscore = 5; } else if (jets_bonus_level < 7) { score (SC_10M); jetscore = 10; } if (!timer_find_gid (GID_HITCHHIKER)) deff_start (DEFF_JETS_LEVEL_UP); }
CALLSET_ENTRY (deadend, sw_dead_end) { // device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS); // event_can_follow (dead_end, camera, TIME_2S); timer_restart_free (GID_DEADEND_TO_SLOT, TIME_4S); //event_can_follow (camera_or_piano, slot_prox, TIME_5S); if (lamp_test (LM_DEAD_END)) { leff_start (LEFF_RIGHT_LOOP); dead_end_count++; deff_start_sync (DEFF_DEAD_END); if (!flag_test (FLAG_SNAKE_READY) && single_ball_play ()) { flag_on (FLAG_SNAKE_READY); deff_start_sync (DEFF_SNAKE_READY); } switch (dead_end_count) { case 1: score (SC_250K); timed_game_extend (15); break; case 2: score (SC_500K); timed_game_extend (20); break; case 3: timed_game_extend (30); if (extra_ball_lit_from_deadend == FALSE && can_award_extra_ball ()) { score (SC_1M); light_easy_extra_ball (); extra_ball_lit_from_deadend = TRUE; } else { score (SC_10M); } dead_end_count = 0; break; default: score (SC_2M); timed_game_extend (30); break; } lamp_off (LM_DEAD_END); } else { deff_start (DEFF_INLANE_LIGHTS_DEAD_END); award_unlit_shot (SW_DEAD_END); score (SC_100K); sound_send (SND_TOWN_SQUARE_AWARD); timed_game_pause (TIME_3S); } }
CALLSET_ENTRY (jet, sw_jet) { /* Hack for when mpf_exit switch breaks */ if (!multi_ball_play () && mpf_timer > 0) callset_invoke (sw_mpf_exit); if (global_flag_test(GLOBAL_FLAG_POWERBALL_IN_PLAY)) jets_scored += 2; else jets_scored++; if (jets_scored >= jets_for_bonus) { bounded_increment (jets_bonus_level, 50); jets_for_bonus += 5; award_unlit_shot (SW_BOTTOM_JET); sound_send (SND_GLASS_BREAKS); task_sleep (TIME_500MS); /* jetscore is used rather than score_deff_get * because it's likely another score would of * happened */ if (jets_bonus_level < 3) { score (SC_1M); jetscore = 1; } else if (jets_bonus_level < 5) { score (SC_5M); jetscore = 5; } else if (jets_bonus_level < 7) { score (SC_10M); jetscore = 10; } if (!timer_find_gid (GID_HITCHHIKER)) deff_start (DEFF_JETS_LEVEL_UP); } if (timed_mode_running_p (&tsm_mode)) { score (SC_500K); score_add (tsm_mode_total, score_table[SC_500K]); } else { score (SC_150K); /* Stop deff from restarting whilst we * are showing the level up deff * or when the hitch anim is running */ if ((jets_scored <= jets_for_bonus) && (!timer_find_gid (GID_HITCHHIKER))) deff_restart (DEFF_JETS_HIT); } task_create_gid1 (GID_JET_SOUND, sw_jet_sound); }
void sw_right_ramp_enter_task (void) { /* Decide whether to let the ball onto the mini-playfield, or dump it. Do this once for each balls that enters the ramp. */ do { /* Let it through to the mpf field if allowed */ if (mpf_ready_p ()) { /* Reset the unlit count so we can * hint to the player again later */ unlit_right_ramps = 0; bridge_open_start (); task_sleep_sec (3); /* Don't close if another ball is on it's way */ if (right_ramps_entered == 1) bridge_open_stop (); } else { /* Ramp was hit unlit, increment the hint counter */ bounded_increment (unlit_right_ramps, 3); /* tell unlit.c that an unlit shot was made */ award_unlit_shot (SW_RIGHT_RAMP); /* Show an animation hint if not enabled for mpf */ if ((unlit_right_ramps == 3 || hurryup_active ()) && !global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING)) deff_start (DEFF_SHOOT_HITCH); else if (global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING) && global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT)) { deff_start (DEFF_SHOOT_JACKPOT); } task_sleep_sec (2); /* Wait until allowed to kickout */ /* TODO BUG? */ while (kickout_locks > 0) task_sleep (TIME_100MS); /* Drop the ball back to the playfield */ sound_send (SND_RIGHT_RAMP_EXIT); bridge_open_start (); task_sleep (TIME_300MS); /* Sleep a bit longer if multiball, so we knock any following * balls back to the playfield */ if (multi_ball_play ()) task_sleep (TIME_200MS); bridge_open_stop (); } } while (--right_ramps_entered > 0); /* Failsafe */ bridge_open_stop (); task_exit (); }
static void shot_slot_oddchange (void) { score (SC_5130); if (check_relight_slot_or_piano ()) { flag_on (FLAG_SLOT_DOOR_LIT); sound_send (SND_FEEL_LUCKY); } award_unlit_shot (SW_SLOT); callset_invoke (oddchange_collected); }
CALLSET_ENTRY (hitch, sw_hitchhiker) { if (timed_mode_running_p (&hitch_mode)) { score (SC_10M); sound_send (SND_HITCHHIKER_COUNT); } else { score (SC_250K); sound_send (SND_HITCHHIKER_DRIVE_BY); award_unlit_shot (SW_HITCHHIKER); } bounded_increment (hitch_count, 99); if ((hitch_count < 20 && hitch_count % 5 == 0) || (hitch_count >= 20 && hitch_count % 10 == 0)) { mpf_enable_count++; sound_send (SND_ARE_YOU_READY_TO_BATTLE); } deff_start (DEFF_HITCHHIKER); }