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,10 +65,6 @@ 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()) {
|
||||
@ -60,7 +76,12 @@ impl Player {
|
||||
}
|
||||
"\u{0002}" => PlayerType::Test1,
|
||||
"\u{0003}" => PlayerType::Test2,
|
||||
_ => PlayerType::Normal,
|
||||
_ => {
|
||||
if name.starts_with("seed:") {
|
||||
PlayerType::Seed
|
||||
} else {
|
||||
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