diff --git a/namerena-runner/src/player.rs b/namerena-runner/src/player.rs index e5d6b69..afce841 100644 --- a/namerena-runner/src/player.rs +++ b/namerena-runner/src/player.rs @@ -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, + /// skl prop + skil_prop: Vec, + /// 玩家状态 + /// + /// 主要是我懒得加一大堆字段 + 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(), } } diff --git a/namerena-runner/src/player/skills.rs b/namerena-runner/src/player/skills.rs new file mode 100644 index 0000000..7973316 --- /dev/null +++ b/namerena-runner/src/player/skills.rs @@ -0,0 +1,4 @@ + +pub enum Skills { + +}