require_once get_file_loc('smr_sector.inc'); $player = new SMR_PLAYER(SmrSession::$old_account_id, SmrSession::$game_id); $ship = new SMR_SHIP(SmrSession::$old_account_id, SmrSession::$game_id); $sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id); // update turns on that player $player->update_turns($ship->speed); // we cant move if we are dead //check if we are in kill db...if we are we don't do anything $db->query("SELECT * FROM kills WHERE dead_id = {$player->account_id} AND game_id = {$player->game_id}"); if (!$db->next_record()) { if ($ship->hardware[HARDWARE_SHIELDS] == 0 && $ship->hardware[HARDWARE_ARMOR] == 0 && ($var["body"] != "trader_attack.php" && $var["url"] != "trader_attack_processing.php" && $var["body"] != "port_attack.php" && $var["url"] != "port_attack_processing.php" && $var["body"] != "planet_attack.php" && $var["url"] != "planet_attack_processing.php")) { $player->sector_id = $player->get_home(); $player->newbie_turns = 100; $player->mark_dead(); $player->update(); $ship->get_pod(); //print("$var[body], $var[url]"); $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "current_sector.php"; forward($container); } } elseif (!isset($var["ahhh"])) { $db->query("SELECT * FROM kills WHERE dead_id = {$player->account_id} AND processed = 'TRUE' AND game_id = {$player->game_id}"); if ($db->next_record() && $var["body"] != "trader_attack.php") { $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "death.php"; $container["ahhh"] = "Yes"; forward($container); }
} $player->get_relations(); if ($port->race_id > 1) { $new_relations = $player->relations[$port->race_id] - 45; if ($new_relations < -500) { $new_relations = -500; } $db->query("REPLACE INTO player_has_relation (account_id, game_id, race_id, relation) VALUES({$player->account_id}, {$player->game_id}, {$port->race_id}, {$new_relations})"); } // also we change alignment if ($player->relations_global_rev[$port->race_id] < -299) { $new_alignment = $player->alignment + $port_original_level * 2; } else { $new_alignment = $player->alignment - $port_original_level * 2; } $db->query("UPDATE player SET alignment={$new_alignment} WHERE account_id={$player->account_id} AND game_id={$player->game_id} LIMIT 1"); } //kill the dead people foreach ($dead_traders as $acc_id) { $dead_acc = new SMR_PLAYER($acc_id, $player->game_id); $dead_acc->died_by_port(); $dead_ship = new SMR_SHIP($acc_id, $player->game_id); $dead_ship->get_pod(); } $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "port_attack.php"; $container["attacker"] = $attacker; $container["portdamage"] = $port_msg; $container["dead_traders"] = $dead_traders; forward($container);
$force_msg[] = "<span style=\"color:yellow;\">{$number_hitting}</span> combat drones drones launch at <span style=\"color:yellow;\">{$curr_attacker->player_name}</span> destroying <span style=\"color:red;\">{$damage}</span> armor."; } } // update ship $curr_attacker_ship->update_hardware(); // is he dead now? if ($curr_attacker_ship->hardware[HARDWARE_SHIELDS] == 0 && $curr_attacker_ship->hardware[HARDWARE_ARMOR] == 0) { $curr_attacker->mark_dead(); } // is he dead? if ($curr_attacker->dead == "TRUE") { // print message $force_msg[] = "<span style=\"color:yellow;\">{$curr_attacker->player_name}</span> is <span style=\"color:red;\">DESTROYED!</span>"; // run through dead methods for player and ship $curr_attacker->died_by_forces($forces->owner_id); $curr_attacker_ship->get_pod(); // if we are the guy who's dead if ($curr_attacker->account_id == $player->account_id) { // we don't want to get a pod screen $curr_attacker->dead = "FALSE"; // and there shouldn't be a cont' button $container["continue"] = "no"; } // make it permanent $curr_attacker->update(); } if ($forces->mines < 1 && $forces->combat_drones < 1 && $forces->scout_drones < 1) { $attacker_msg[] = "Forces are <span style=\"color:red;\">DESTROYED!</span>"; $container["continue"] = "no"; } }