コード例 #1
0
            $msg .= "and destroys ";
        }
        if ($drones_to_armor == 1) {
            $msg .= "<span style=\"color:red;\">1</span> plate of armor";
        } else {
            $msg .= "<span style=\"color:red;\">{$drones_to_armor}</span> plates of armor";
        }
    }
    // add this to the outgoing message array
    $port_msg[] = $msg . ".";
    // is he dead now?
    if ($curr_attacker_ship->hardware[HARDWARE_SHIELDS] == 0 && $curr_attacker_ship->hardware[HARDWARE_ARMOR] == 0 && !in_array($curr_attacker->account_id, $dead_traders)) {
        // write a message to the array
        $port_msg[] = "<span style=\"color:yellow;\">{$curr_attacker->player_name}</span> has been <span style=\"color:red;\">DESTROYED</span> by port forces";
        if ($curr_attacker->account_id != $player->account_id) {
            $curr_attacker->set_info('dead', "TRUE");
        }
        // add him to the array to process later
        $dead_traders[] = $curr_attacker->account_id;
    }
    // update ship
    $curr_attacker_ship->update_hardware();
}
// get the overall damage
if ($port_damage > 0) {
    $port_msg[] = "This port does a total of <span style=\"color:red;\">{$port_damage}</span> damage in this round of combat.";
} else {
    $port_msg[] = "This port does no damage at all. It needs a better attack coordinator";
}
// ********************************
// *