ruaaaa
This commit is contained in:
parent
50940e5004
commit
a7843587f7
@ -123,25 +123,6 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) {
|
|||||||
|
|
||||||
let xu_qd = crate::evaluate::xuping::XuPing2_0_1015_QD::evaluate(&namer);
|
let xu_qd = crate::evaluate::xuping::XuPing2_0_1015_QD::evaluate(&namer);
|
||||||
|
|
||||||
// debug!("Id:{:>15}|{:>5}|{}|{}", i, full_name, xu, show_name(&namer));
|
|
||||||
|
|
||||||
// let skill_sum: u32 = {
|
|
||||||
// let mut sum: u32 = 0;
|
|
||||||
// for i in namer.skl_freq.iter() {
|
|
||||||
// sum += *i as u32;
|
|
||||||
// }
|
|
||||||
// sum
|
|
||||||
// };
|
|
||||||
// if namer.get_净化() < 70 {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// if namer.get_幻术() < 20 {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// if skill_sum < 150 {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
get_count += 1;
|
get_count += 1;
|
||||||
info!("Id:{:>15}|{}|{}|{}", i, full_name, xu, namer.get_info());
|
info!("Id:{:>15}|{}|{}|{}", i, full_name, xu, namer.get_info());
|
||||||
|
|
||||||
@ -151,7 +132,7 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) {
|
|||||||
full_name,
|
full_name,
|
||||||
xu,
|
xu,
|
||||||
xu_qd,
|
xu_qd,
|
||||||
namer.get_info()
|
namer.get_info_csv()
|
||||||
);
|
);
|
||||||
|
|
||||||
// 写入 (写到最后一行)
|
// 写入 (写到最后一行)
|
||||||
|
@ -67,9 +67,9 @@ fn main() {
|
|||||||
|
|
||||||
let mut threads = Vec::with_capacity(cli_arg.thread_count as usize);
|
let mut threads = Vec::with_capacity(cli_arg.thread_count as usize);
|
||||||
let now = chrono::Local::now().format("%Y-%m-%d_%H-%M-%S").to_string();
|
let now = chrono::Local::now().format("%Y-%m-%d_%H-%M-%S").to_string();
|
||||||
// namerena-<team>-<time>.txt
|
// namerena-<team>-<time>.csv
|
||||||
// <time>: %Y-%m-%d-%H-%M-%S
|
// <time>: %Y-%m-%d-%H-%M-%S
|
||||||
let output_filename = format!("namerena-{}-{}.txt", cli_arg.team, now);
|
let output_filename = format!("namerena-{}-{}.csv", cli_arg.team, now);
|
||||||
let out_path = PathBuf::from(format!("./namerena/{}", output_filename));
|
let out_path = PathBuf::from(format!("./namerena/{}", output_filename));
|
||||||
info!("输出文件: {:?}", out_path);
|
info!("输出文件: {:?}", out_path);
|
||||||
// 先创建文件夹
|
// 先创建文件夹
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
use std::cmp::min;
|
use std::cmp::min;
|
||||||
#[cfg(feature = "simd")]
|
#[cfg(feature = "simd")]
|
||||||
use std::simd::cmp::SimdPartialOrd;
|
|
||||||
#[cfg(feature = "simd")]
|
|
||||||
use std::simd::u8x64;
|
use std::simd::u8x64;
|
||||||
|
|
||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
@ -482,6 +480,45 @@ impl Namer {
|
|||||||
format!("{}|{}", main, skills)
|
format!("{}|{}", main, skills)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_info_csv(&self) -> String {
|
||||||
|
let main = format!(
|
||||||
|
"{},{},{},{},{},{},{},{},{},{},{}",
|
||||||
|
self.name,
|
||||||
|
self.team,
|
||||||
|
self.name_prop[0],
|
||||||
|
self.name_prop[1],
|
||||||
|
self.name_prop[2],
|
||||||
|
self.name_prop[3],
|
||||||
|
self.name_prop[4],
|
||||||
|
self.name_prop[5],
|
||||||
|
self.name_prop[6],
|
||||||
|
self.name_prop[7],
|
||||||
|
self.get_property()
|
||||||
|
);
|
||||||
|
let skills = {
|
||||||
|
let mut base = "".to_string();
|
||||||
|
let skill_names = [
|
||||||
|
"火球", "冰冻", "雷击", "地裂", "吸血", "投毒", "连击", "会心", "瘟疫", "命轮", "狂暴", "魅惑", "加速", "减速",
|
||||||
|
"诅咒", "治愈", "苏生", "净化", "铁壁", "蓄力", "聚气", "潜行", "血祭", "分身", "幻术", "防御", "守护", "反弹",
|
||||||
|
"护符", "护盾", "反击", "吞噬", "亡灵", "垂死", "隐匿", "啧", "啧", "啧", "啧", "啧",
|
||||||
|
];
|
||||||
|
// 后处理
|
||||||
|
let mut skills = [0; 40];
|
||||||
|
for i in 0..40 {
|
||||||
|
if self.skl_freq[i] != 0 {
|
||||||
|
skills[self.skl_id[i] as usize] = self.skl_freq[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i, v) in skills.iter().enumerate() {
|
||||||
|
if *v > 0 {
|
||||||
|
base.push_str(format!("{}-{},", skill_names[i], v).as_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
base
|
||||||
|
};
|
||||||
|
format!("{},{}", main, skills)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_fullname(&self) -> String {
|
pub fn get_fullname(&self) -> String {
|
||||||
if self.team.is_empty() {
|
if self.team.is_empty() {
|
||||||
self.name.clone()
|
self.name.clone()
|
||||||
|
Loading…
Reference in New Issue
Block a user