ruaaa
This commit is contained in:
parent
434d5c9b9b
commit
97cfc94234
@ -1,8 +1,28 @@
|
||||
pub mod skills;
|
||||
|
||||
pub struct PlayerStatus {
|
||||
frozen: bool,
|
||||
}
|
||||
|
||||
impl Default for PlayerStatus {
|
||||
fn default() -> Self {
|
||||
PlayerStatus { frozen: false }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Player {
|
||||
team: String,
|
||||
name: String,
|
||||
weapon: String,
|
||||
player_type: PlayerType,
|
||||
/// skl id
|
||||
skil_id: Vec<u32>,
|
||||
/// skl prop
|
||||
skil_prop: Vec<u32>,
|
||||
/// 玩家状态
|
||||
///
|
||||
/// 主要是我懒得加一大堆字段
|
||||
status: PlayerStatus,
|
||||
}
|
||||
|
||||
pub const BOSS_NAMES: [&str; 11] = [
|
||||
@ -45,22 +65,23 @@ pub enum PlayerType {
|
||||
impl Player {
|
||||
pub fn new(team: String, name: String, weapon: String) -> Self {
|
||||
let player_type = {
|
||||
if name.starts_with("seed:") {
|
||||
// 种子
|
||||
PlayerType::Seed
|
||||
} else {
|
||||
match team.as_str() {
|
||||
"!" => {
|
||||
if BOSS_NAMES.contains(&name.as_str()) {
|
||||
PlayerType::Boss
|
||||
} else {
|
||||
// 高强度测号用靶子
|
||||
PlayerType::TestEx
|
||||
}
|
||||
match team.as_str() {
|
||||
"!" => {
|
||||
if BOSS_NAMES.contains(&name.as_str()) {
|
||||
PlayerType::Boss
|
||||
} else {
|
||||
// 高强度测号用靶子
|
||||
PlayerType::TestEx
|
||||
}
|
||||
}
|
||||
"\u{0002}" => PlayerType::Test1,
|
||||
"\u{0003}" => PlayerType::Test2,
|
||||
_ => {
|
||||
if name.starts_with("seed:") {
|
||||
PlayerType::Seed
|
||||
} else {
|
||||
PlayerType::Normal
|
||||
}
|
||||
"\u{0002}" => PlayerType::Test1,
|
||||
"\u{0003}" => PlayerType::Test2,
|
||||
_ => PlayerType::Normal,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -69,6 +90,9 @@ impl Player {
|
||||
name,
|
||||
weapon,
|
||||
player_type,
|
||||
skil_id: vec![],
|
||||
skil_prop: vec![],
|
||||
status: PlayerStatus::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
4
namerena-runner/src/player/skills.rs
Normal file
4
namerena-runner/src/player/skills.rs
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
pub enum Skills {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user