if (!defined('MMRPG_SCRIPT_REQUEST')) { require 'prototype_dr-xxx_passwords.php'; } // Require the MISSIONS file for this player require 'prototype_dr-xxx_missions.php'; // Define the robot options and counter for this mode if (empty($_SESSION['PROTOTYPE_TEMP'][$this_prototype_data['this_player_token'] . '_robot_options'])) { $this_prototype_data['robot_options'] = !empty($mmrpg_index['players'][$this_prototype_data['this_player_token']]['player_robots']) ? $mmrpg_index['players'][$this_prototype_data['this_player_token']]['player_robots'] : array(); foreach ($this_prototype_data['robot_options'] as $key => $info) { if (!rpg_game::robot_unlocked($this_prototype_data['this_player_token'], $info['robot_token'])) { unset($this_prototype_data['robot_options'][$key]); } else { $temp_settings = rpg_game::robot_settings($this_prototype_data['this_player_token'], $info['robot_token']); $this_prototype_data['robot_options'][$key]['original_player'] = !empty($temp_settings['original_player']) ? $temp_settings['original_player'] : $this_prototype_data['this_player_token']; $this_prototype_data['robot_options'][$key]['robot_abilities'] = !empty($temp_settings['robot_abilities']) ? $temp_settings['robot_abilities'] : array(); $this_prototype_data['robot_options'][$key]['robot_item'] = !empty($temp_settings['robot_item']) ? $temp_settings['robot_item'] : ''; } } $this_prototype_data['robot_options'] = array_values($this_prototype_data['robot_options']); usort($this_prototype_data['robot_options'], array('rpg_prototype', 'sort_robots_position')); $_SESSION['PROTOTYPE_TEMP'][$this_prototype_data['this_player_token'] . '_robot_options'] = $this_prototype_data['robot_options']; } else { $this_prototype_data['robot_options'] = $_SESSION['PROTOTYPE_TEMP'][$this_prototype_data['this_player_token'] . '_robot_options']; } // Generate the markup for this player's robot select screen $this_prototype_data['robots_markup'] = rpg_prototype::robot_select_markup($this_prototype_data); // Generate the markup for any leftover player missions $this_prototype_data['missions_markup'] .= rpg_prototype::options_markup($this_prototype_data['battle_options'], $this_prototype_data['this_player_token']); // Add all these options to the global prototype data variable $prototype_data[$this_prototype_data['this_player_token']] = $this_prototype_data; unset($this_prototype_data);