<?php /* * DEMO ROBOT SELECT */ if (!empty($_SESSION[$session_token]['DEMO'])) { // Only show robot select if the player has more than two robots if (rpg_game::robots_unlocked('dr-light') > 3) { // Print out the demo mode's robot select screen for Dr. Light echo '<div class="option_wrapper option_wrapper_hidden" data-condition="this_player_token=dr-light">' . "\n"; if (defined('MMRPG_SCRIPT_REQUEST')) { echo $prototype_data['demo']['robots_markup'] . "\n"; } else { echo '<a class="option option_sticky option_1x4 option_this-team-select option_disabled block_9" data-parent="true" data-token="" style=""><div class="platform"><div class="chrome"><div class="inset"><label class="has_image" style="width: 100px; margin-left: 70%; padding-left: 0;"><span class="single"><span class="count">0/8 Select</span><span class="arrow"> </span></span></label></div></div></div></a>' . "\n"; } echo '</div>' . "\n"; } } else { // Only print out Light's data if conditions allow or do not exist if (empty($this_data_condition) || in_array('this_player_token=dr-light', $this_data_condition)) { // Print out the normal mode's robot select screen for Dr. Light if ($unlock_flag_light) { echo '<div class="option_wrapper option_wrapper_hidden" data-condition="this_player_token=dr-light">' . "\n"; if (defined('MMRPG_SCRIPT_REQUEST')) { echo $prototype_data['dr-light']['robots_markup'] . "\n"; } else { echo '<a class="option option_sticky option_1x4 option_this-team-select option_disabled block_9" data-parent="true" data-token="" style=""><div class="platform"><div class="chrome"><div class="inset"><label class="has_image" style=""><span class="single"><span class="count">0/8 Select</span><span class="arrow"> </span></span></label></div></div></div></a>' . "\n"; } echo '</div>' . "\n"; } }
gameSettings.pointsUnlocked = <?= !empty($_SESSION['GAME']['counters']['battle_points']) ? $_SESSION['GAME']['counters']['battle_points'] : 0 ?>; gameSettings.fadeIn = true; gameSettings.demo = <?= $_SESSION['GAME']['DEMO'] ?>; gameSettings.wapFlag = <?= $flag_wap ? 'true' : 'false' ?>; gameSettings.cacheTime = '<?= MMRPG_CONFIG_CACHE_DATE?>'; gameSettings.startLink = '<?= $prototype_start_link ?>'; gameSettings.windowEventsCanvas = []; gameSettings.windowEventsMessages = []; gameSettings.totalPlayerOptions = <?= $unlock_count_players ?>; gameSettings.prototypeBannerKey = 0; gameSettings.prototypeBanners = ['prototype-banners_title-screen_01.gif']; // Define any preset menu selections battleOptions['this_player_id'] = <?= $this_userid ?>; <?php if(rpg_game::is_demo()): ?> battleOptions['this_player_token'] = 'dr-light'; <?php if(rpg_game::robots_unlocked('dr-light') == 3): ?> battleOptions['this_player_robots'] = '103_mega-man,104_bass,105_proto-man'; <?endif;?> <?php else: ?> <?php if(!empty($_SESSION['GAME']['battle_settings']['this_player_token'])): ?> battleOptions['this_player_token'] = '<?= $_SESSION['GAME']['battle_settings']['this_player_token']?>'; <?php elseif($unlock_count_players < 2): ?> battleOptions['this_player_token'] = 'dr-light'; <?php endif; ?> <?php endif; ?> // Create the document ready events $(document).ready(function(){ <?php if($prototype_start_link == 'home' && empty($_SESSION['GAME']['battle_settings']['this_player_token'])): ?> // Start playing the title screen music parent.mmrpg_music_load('misc/player-select', true, false);
$ability_counter_wily = $unlock_flag_wily ? rpg_game::abilities_unlocked('dr-wily') : 0; $star_counter_wily = $unlock_flag_wily ? rpg_game::stars_unlocked('dr-wily') : 0; $core_counter_wily = $unlock_flag_wily ? rpg_game::cores_unlocked('dr-wily') : 0; } $battle_complete_counter_wily = $unlock_flag_wily ? rpg_prototype::battles_complete('dr-wily') : 0; $battle_failure_counter_wily = $unlock_flag_wily ? rpg_prototype::battles_failure('dr-wily') : 0; //$battle_complete_counter_wily_total = $unlock_flag_light ? rpg_prototype::battles_complete('dr-wily', false) : 0; //$battle_failure_counter_wily_total = $unlock_flag_light ? rpg_prototype::battles_failure('dr-wily', false) : 0; $prototype_complete_flag_wily = $unlock_flag_wily ? rpg_prototype::campaign_complete('dr-wily') : false; if ($unlock_flag_wily && !$prototype_complete_flag_wily && $battle_complete_counter_wily >= 17) { $_SESSION[$session_token]['flags']['prototype_events']['dr-wily']['prototype_complete'] = $prototype_complete_flag_wily = true; } // Collect the counters and flags for Dr. Cossack $unlock_flag_cossack = rpg_game::player_unlocked('dr-cossack'); $point_counter_cossack = $unlock_flag_cossack ? rpg_game::player_points('dr-cossack') : 0; $robot_counter_cossack = $unlock_flag_cossack ? rpg_game::robots_unlocked('dr-cossack') : 0; if (empty($this_data_condition) || $this_data_select == 'this_player_token' || in_array('this_player_token=dr-cossack', $this_data_condition)) { $ability_counter_cossack = $unlock_flag_cossack ? rpg_game::abilities_unlocked('dr-cossack') : 0; $star_counter_cossack = $unlock_flag_cossack ? rpg_game::stars_unlocked('dr-cossack') : 0; $core_counter_cossack = $unlock_flag_cossack ? rpg_game::cores_unlocked('dr-cossack') : 0; } $battle_complete_counter_cossack = $unlock_flag_cossack ? rpg_prototype::battles_complete('dr-cossack') : 0; $battle_failure_counter_cossack = $unlock_flag_cossack ? rpg_prototype::battles_failure('dr-cossack') : 0; //$battle_complete_counter_cossack_total = $unlock_flag_light ? rpg_prototype::battles_complete('dr-cossack', false) : 0; //$battle_failure_counter_cossack_total = $unlock_flag_light ? rpg_prototype::battles_failure('dr-cossack', false) : 0; $prototype_complete_flag_cossack = $unlock_flag_cossack ? rpg_prototype::campaign_complete('dr-cossack') : false; if ($unlock_flag_cossack && !$prototype_complete_flag_cossack && $battle_complete_counter_cossack >= 17) { $_SESSION[$session_token]['flags']['prototype_events']['dr-cossack']['prototype_complete'] = $prototype_complete_flag_cossack = true; } // -- Mission Counts -- // // Define the missions counts for each chapter
// -- DR. LIGHT MENU OPTIONS -- // // Define the robot options and counter for Dr. Light mode $this_prototype_data['this_player_token'] = 'dr-light'; $this_prototype_data['this_player_field'] = 'light-laboratory'; $this_prototype_data['this_support_robot'] = 'roll'; $this_prototype_data['this_chapter_levels'] = array(0 => 1, 1 => 4, 2 => 12, 3 => 31, 4 => 35, 5 => 40, 6 => 45); $this_prototype_data['this_chapter_unlocked'] = $chapters_unlocked_light; $this_prototype_data['target_player_token'] = 'dr-wily'; $this_prototype_data['battle_phase'] = 0; $this_prototype_data['battle_options'] = array(); $this_prototype_data['missions_markup'] = ''; $this_prototype_data['battles_complete'] = rpg_prototype::battles_complete($this_prototype_data['this_player_token']); $this_prototype_data['phase_token'] = 'phase' . $this_prototype_data['battle_phase']; $this_prototype_data['phase_battle_token'] = $this_prototype_data['this_player_token'] . '-' . $this_prototype_data['phase_token']; $this_prototype_data['robots_unlocked'] = rpg_game::robots_unlocked($this_prototype_data['this_player_token']); $this_prototype_data['abilities_unlocked'] = rpg_game::abilities_unlocked($this_prototype_data['this_player_token']); $this_prototype_data['points_unlocked'] = rpg_game::player_points($this_prototype_data['this_player_token']); $this_prototype_data['prototype_complete'] = $prototype_complete_flag_light; // Define the stage select music based on progression $this_music_token = $this_prototype_data['battles_complete'] >= 10 ? $this_prototype_data['target_player_token'] : $this_prototype_data['this_player_token']; $this_prototype_data['missions_music'] = 'misc/stage-select-' . $this_music_token; // Define the robot omega array for dynamic battle options $temp_session_key = $this_prototype_data['this_player_token'] . '_target-robot-omega_prototype'; $this_prototype_data['target_robot_omega'] = !empty($_SESSION['GAME']['values'][$temp_session_key]) ? $_SESSION['GAME']['values'][$temp_session_key] : array(); $this_prototype_data['this_player_fields'] = !empty($_SESSION['GAME']['values']['battle_settings'][$this_prototype_data['this_player_token']]['player_fields']) ? $_SESSION['GAME']['values']['battle_settings'][$this_prototype_data['this_player_token']]['player_fields'] : array(); // If the options have not already been defined, generate them $temp_save = false; if (empty($this_prototype_data['target_robot_omega'])) { // Define the phase one omega factors, then shuffle $this_prototype_data['target_robot_omega'] = $this_omega_factors_one;