This commit is contained in:
Moritz Roßbacher 2023-11-04 16:14:33 +01:00
parent 62bf8278f6
commit 22af0bb033
5 changed files with 382 additions and 125 deletions

92
Cargo.lock generated
View file

@ -465,9 +465,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.4.6"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956"
checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b"
dependencies = [
"clap_builder",
"clap_derive",
@ -475,9 +475,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.4.6"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45"
checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663"
dependencies = [
"anstream",
"anstyle",
@ -487,18 +487,18 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.4.3"
version = "4.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7"
checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae"
dependencies = [
"clap",
]
[[package]]
name = "clap_derive"
version = "4.4.2"
version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873"
checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
dependencies = [
"heck",
"proc-macro2",
@ -508,9 +508,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "0.5.1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
[[package]]
name = "clru"
@ -588,9 +588,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]]
name = "cpufeatures"
version = "0.2.10"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4"
checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0"
dependencies = [
"libc",
]
@ -929,9 +929,9 @@ dependencies = [
[[package]]
name = "futures"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335"
dependencies = [
"futures-channel",
"futures-core",
@ -944,9 +944,9 @@ dependencies = [
[[package]]
name = "futures-channel"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb"
dependencies = [
"futures-core",
"futures-sink",
@ -954,15 +954,15 @@ dependencies = [
[[package]]
name = "futures-core"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
[[package]]
name = "futures-executor"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc"
dependencies = [
"futures-core",
"futures-task",
@ -971,15 +971,15 @@ dependencies = [
[[package]]
name = "futures-io"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"
[[package]]
name = "futures-macro"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
dependencies = [
"proc-macro2",
"quote",
@ -988,21 +988,21 @@ dependencies = [
[[package]]
name = "futures-sink"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
[[package]]
name = "futures-task"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
[[package]]
name = "futures-util"
version = "0.3.28"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
dependencies = [
"futures-channel",
"futures-core",
@ -1992,9 +1992,9 @@ dependencies = [
[[package]]
name = "hyper-rustls"
version = "0.24.1"
version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
"http",
@ -3166,9 +3166,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustix"
version = "0.38.20"
version = "0.38.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0"
checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3"
dependencies = [
"bitflags 2.4.1",
"errno",
@ -3285,9 +3285,9 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.189"
version = "1.0.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7"
dependencies = [
"serde_derive",
]
@ -3304,9 +3304,9 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.189"
version = "1.0.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3"
dependencies = [
"proc-macro2",
"quote",
@ -3374,13 +3374,13 @@ dependencies = [
[[package]]
name = "serenity"
version = "0.11.6"
version = "0.11.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d007dc45584ecc47e791f2a9a7cf17bf98ac386728106f111159c846d624be3f"
checksum = "7a7a89cef23483fc9d4caf2df41e6d3928e18aada84c56abd237439d929622c6"
dependencies = [
"async-trait",
"async-tungstenite",
"base64 0.13.1",
"base64 0.21.5",
"bitflags 1.3.2",
"bytes",
"cfg-if",
@ -3783,13 +3783,13 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.8.0"
version = "3.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
dependencies = [
"cfg-if",
"fastrand",
"redox_syscall 0.3.5",
"redox_syscall 0.4.1",
"rustix",
"windows-sys 0.48.0",
]
@ -3968,9 +3968,9 @@ dependencies = [
[[package]]
name = "tokio-util"
version = "0.7.9"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d"
checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
dependencies = [
"bytes",
"futures-core",

View file

@ -4,10 +4,9 @@ use crate::commands::{
*,
Map::{*}
},
zombies::{
rounds
}
zombies::rounds
};
use crate::commands::zombies::rounds::get_round_string;
#[poise::command(slash_command)]
pub(crate) async fn round(
@ -18,11 +17,9 @@ pub(crate) async fn round(
#[max = 105_u8]
round: u8
) -> Result<(), Error> {
match map {
DeadEnd => {}
BadBlood => {rounds::BadBlood::get_round(round);}
AlienArcadium => {}
}
ctx.say(format!("hi")).await?;
let t = get_round_string(map,round);
ctx.say(t).await?;
Ok(())
}

View file

@ -13,7 +13,7 @@ pub type SkinId = u8;
pub type LeatherColor = u32;
#[derive(Debug)]
pub enum ArmorPiece {
None(ArmorValue),
None,
Helmet(ArmorValue, Enchanted, ArmorMaterial),
Head(ArmorValue, Enchanted, SkinId),
Chestplate(ArmorValue, Enchanted, ArmorMaterial),
@ -24,7 +24,7 @@ pub enum ArmorPiece {
impl ArmorPiece {
pub fn armor_value(&self) -> &ArmorValue {
match self {
ArmorPiece::None(value) => value,
ArmorPiece::None => &0,
Helmet(value, _, _) => value,
Head(value, _, _) => value,
Chestplate(value, _, _) => value,
@ -32,6 +32,38 @@ impl ArmorPiece {
Boots(value, _, _) => value
}
}
pub fn is_enchanted(&self) -> &Enchanted {
match self {
ArmorPiece::None => &false,
Helmet(_, enchanted, _) => enchanted,
Head(_, enchanted, _) => enchanted,
Chestplate(_, enchanted, _) => enchanted,
Leggings(_, enchanted, _) => enchanted,
Boots(_, enchanted, _) => enchanted
}
}
pub fn info(&self) -> (&ArmorMaterial, &SkinId, &LeatherColor) {
match self {
None => (&ArmorMaterial::None,&0,&0),
Head(_, _, skin) => (&ArmorMaterial::None,skin,&0),
Helmet(_, _, material) => match material {
Leather(color) => (material,&0,&color),
_ => (material,&0,&0)
},
Chestplate(_, _, material) => match material {
Leather(color) => (material,&0,&color),
_ => (material,&0,&0)
},
Leggings(_, _, material) => match material {
Leather(color) => (material,&0,&color),
_ => (material,&0,&0)
},
Boots(_, _, material) => match material {
Leather(color) => (material,&0,&color),
_ => (material,&0,&0)
},
}
}
}
#[derive(Debug)]
@ -44,12 +76,27 @@ pub enum WeaponMaterial {
}
#[derive(Debug)]
pub enum ArmorMaterial {
None,
Leather(LeatherColor),
Gold,
Chainmail,
Iron,
Diamond
}
impl ArmorMaterial {
fn color(&self) -> LeatherColor {
match self {
ArmorMaterial::None => 0,
Leather(color) => color,
ArmorMaterial::Gold => 0,
Chainmail => 0,
ArmorMaterial::Iron => 0,
ArmorMaterial::Diamond => 0
}
}
}
#[derive(Debug)]
pub enum Weapon {
None,
@ -72,10 +119,13 @@ impl Weapon {
//No Gear
pub const NO_HELMET: ArmorPiece = ArmorPiece::None(0);
pub const NO_CHESTPLATE: ArmorPiece = ArmorPiece::None(0);
pub const NO_LEGGINGS: ArmorPiece = ArmorPiece::None(0);
pub const NO_BOOTS: ArmorPiece = ArmorPiece::None(0);
pub const NO_HELMET: ArmorPiece = ArmorPiece::None;
pub const NO_CHESTPLATE: ArmorPiece = ArmorPiece::None;
pub const NO_LEGGINGS: ArmorPiece = ArmorPiece::None;
pub const NO_BOOTS: ArmorPiece = ArmorPiece::None;
pub const GOLDEN_CHESTPLATE: ArmorPiece = Chestplate(5,false,ArmorMaterial::Gold);
pub const GOLDEN_LEGGINGS: ArmorPiece = Leggings(3,false,ArmorMaterial::Gold);
pub const GOLDEN_BOOTS: ArmorPiece = Boots(1,false,ArmorMaterial::Gold);
pub const CHAIN_CHESTPLATE: ArmorPiece = Chestplate(5,false,Chainmail);
pub const CHAIN_LEGGINGS: ArmorPiece = Leggings(4,false,Chainmail);
pub const CHAIN_BOOTS: ArmorPiece = Boots(1, false, Chainmail);
@ -87,6 +137,7 @@ pub const LILY_HEAD: ArmorPiece = Head(0,false,2);
//Weapons
pub const NO_WEAPON: Weapon = Weapon::None;
pub const WOODEN_AXE: Weapon = Axe(3,false,Wood);
pub const STONE_AXE: Weapon = Axe(4,false,Stone);
pub const DIAMOND_AXE: Weapon = Axe(6,false,WeaponMaterial::Diamond);
pub const GOLD_SWORD: Weapon = Sword(4,false,WeaponMaterial::Gold);
pub const STONE_SWORD: Weapon = Sword(5,false,Stone);

View file

@ -1,12 +1,14 @@
use std::fmt::format;
use crate::commands::lfg::Map;
use crate::commands::zombies::zombies::*;
pub type Wave = Vec<Horde>;
pub type Round = Vec<Wave>;
type Wave<'a> = Vec<Horde<'a>>;
pub(crate) type Round<'a> = Vec<Wave<'a>>;
pub(crate) struct BadBlood;
struct BadBlood;
impl BadBlood {
fn round1() -> Round {
fn round1<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -24,7 +26,7 @@ impl BadBlood {
]
]
}
fn round2() -> Round {
fn round2<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -50,7 +52,7 @@ impl BadBlood {
]
]
}
fn round3() -> Round {
fn round3<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -84,7 +86,7 @@ impl BadBlood {
]
]
}
fn round4() -> Round {
fn round4<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -129,7 +131,7 @@ impl BadBlood {
]
]
}
fn round5() -> Round {
fn round5<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -174,7 +176,7 @@ impl BadBlood {
]
]
}
fn round6() -> Round {
fn round6<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -211,7 +213,7 @@ impl BadBlood {
]
]
}
fn round7() -> Round {
fn round7<'a>() -> Round<'a> {
vec![
//wave 1
vec![
@ -248,10 +250,81 @@ impl BadBlood {
]
]
}
/*fn round8() -> Round {
}*/
pub(crate) fn get_round(round: u8) -> Option<Round> {
fn round8<'a>() -> Round<'a> {
vec![
//wave 1
vec![
Horde {
zombie: BB_Z_5,
count: 4,
},
Horde {
zombie: BB_P_1,
count: 2,
}
],
//wave 2
vec![
Horde {
zombie: BB_Z_5,
count: 4,
},
Horde {
zombie: BB_P_1,
count: 2,
}
],
//wave 3
vec![
Horde {
zombie: BB_Z_5,
count: 4,
},
Horde {
zombie: BB_P_1,
count: 1,
},
]
]
}
fn round9<'a>() -> Round<'a> {
vec![
//wave 1
vec![
Horde {
zombie: BB_SZ_1,
count: 3,
},
Horde {
zombie: BB_S_1,
count: 5,
}
],
//wave 2
vec![
Horde {
zombie: BB_SZ_1,
count: 3,
},
Horde {
zombie: BB_S_1,
count: 4,
}
],
//wave 3
vec![
Horde {
zombie: BB_SZ_1,
count: 3,
},
Horde {
zombie: BB_S_1,
count: 4,
},
]
]
}
fn get_round<'b>(round: u8) -> Option<Round<'b>> {
match round {
1 => Some(Self::round1()),
2 => Some(Self::round2()),
@ -260,7 +333,79 @@ impl BadBlood {
5 => Some(Self::round5()),
6 => Some(Self::round6()),
7 => Some(Self::round7()),
8 => Some(Self::round8()),
9 => Some(Self::round9()),
_ => None
}
}
}
pub(crate) fn get_round<'a>(
map: &Map,
round: u8,
) -> Option<Round<'a>> {
match map {
Map::DeadEnd => BadBlood::get_round(round),
Map::BadBlood => BadBlood::get_round(round),
Map::AlienArcadium => BadBlood::get_round(round)
}
}
pub(crate) fn get_round_string (
map: Map,
r: u8) -> String {
let round = get_round(&map, r);
if round.is_some() {
let mut string = String::new();
let mut wave_index:u8 = 0;
for wave in round.unwrap() {
wave_index += 1;
string.push_str(format!("# Wave {}\n", wave_index).as_str());
for horde in wave {
string.push_str(format!(
"### {}x {} {}\n",
horde.count,
horde.zombie.family(),
horde.zombie.tier
).as_str());
let mut armor_string = String::new();
let armor = *horde.zombie.armor();
let (x,y,z) = armor.get(0).unwrap();
let (x,_,z) = armor.get(1).unwrap();
let (x,_,z) = armor.get(2).unwrap();
let (x,_,z) = armor.get(3).unwrap();
armor_string.push_str("");
string.push_str(format!(
"- Health: {}\n- Damage: {}\n- Armor: {} {:?}\n- Follow Range: {}\n- Speed: {}\n",
horde.zombie.health(),
horde.zombie.damage().1,
horde.zombie.armor_value(),
horde.zombie.armor(),
horde.zombie.follow_range(),
horde.zombie.speed,
).as_str());
}
}
string
} else {
String::from(format!("There is no Round {} on the Map {}", r, &map))
}
}

View file

@ -8,28 +8,28 @@ use crate::commands::zombies::gear::{
type ChildrenCount = u8;
type RespawningChildren = bool;
#[derive(Debug)]
pub struct Family {
name: *const str,
pub struct Family<'a> {
name: &'a str,
damage: u8,
health: u16,
follow_range: u8,
base_armor: u8,
}
#[derive(Debug)]
pub struct Zombie {
family: Family,
pub struct Zombie<'a> {
family: &'a Family<'a>,
pub tier: u8,
pub speed: f32,
armor: Armor,
weapon: Weapon,
children: Children,
armor: &'a Armor,
weapon: &'a Weapon,
children: Children<'a>,
damage_type: DamageType,
}
#[derive(Debug)]
pub enum Children {
pub enum Children<'a> {
None,
Single(&'static Horde, RespawningChildren),
Single(&'a Horde<'a>, RespawningChildren),
}
#[derive(Debug)]
pub enum Ability {
@ -45,7 +45,7 @@ pub enum DamageType {
MeleeAbility(Ability),
RangedAbility(Ability),
}
impl Zombie {
impl Zombie<'_> {
pub fn health(&self) -> u16 {
self.family.health
}
@ -55,21 +55,33 @@ impl Zombie {
pub fn follow_range(&self) -> u8 {
self.family.follow_range
}
pub fn armor_value(&self) -> ArmorValue {
pub fn armor_value(&self) -> (ArmorValue) {
let mut armor = self.family.base_armor;
for piece in &self.armor {
for piece in self.armor {
armor += piece.armor_value();
}
armor
(armor)
}
pub fn family(&self) -> *const str {
pub fn armor(&self) -> [(&ArmorMaterial, &SkinId, &LeatherColor);4] {
let mut t:[(&ArmorMaterial, &SkinId, &LeatherColor);4] = [(&ArmorMaterial::None, &0, &0);4];
let mut index = 0;
for piece in self.armor {
t[index] = piece.info();
index +=1;
}
t
}
pub fn speed(&self) -> f32 {
self.speed
}
pub fn family(&self) -> &str {
self.family.name
}
}
#[derive(Debug)]
pub struct Horde {
pub zombie: Zombie,
pub struct Horde<'a> {
pub zombie: Zombie<'a>,
pub count: u8,
}
@ -115,144 +127,196 @@ pub const BB_WEREWOLF: Family = Family {
follow_range: 35,
base_armor: 2,
};
pub const BB_PIGMAN: Family = Family {
name: "pigman",
damage: 5,
health: 20,
follow_range: 35,
base_armor: 2,
};
pub const BB_Z_1: Zombie = Zombie {
family: BB_BASIC,
family: &BB_BASIC,
tier: 1,
speed: 0.25,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
NO_LEGGINGS,
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_Z_2: Zombie = Zombie {
family: BB_BASIC,
family: &BB_BASIC,
tier: 2,
speed: 0.25,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
Leggings(2,false,Leather(0x000000)),
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_Z_3: Zombie = Zombie {
family: BB_BASIC,
family: &BB_BASIC,
tier: 3,
speed: 0.25,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
Leggings(2,false,Leather(0x000000)),
NO_BOOTS,
],
weapon: WOODEN_AXE,
weapon: &WOODEN_AXE,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_Z_4: Zombie = Zombie {
family: BB_BASIC,
family: &BB_BASIC,
tier: 4,
speed: 0.25,
armor: [
armor: &[
NO_HELMET,
Chestplate(3,false,Leather(0x000000)),
Leggings(2,false,Leather(0x000000)),
NO_BOOTS,
],
weapon: WOODEN_AXE,
weapon: &WOODEN_AXE,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_Z_5: Zombie = Zombie {
family: &BB_BASIC,
tier: 5,
speed: 0.25,
armor: &[
NO_HELMET,
Chestplate(3,false,Leather(0x000000)),
Leggings(2,false,Leather(0x000000)),
Boots(1,false,Leather(0x000000)),
],
weapon: &WOODEN_AXE,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_Z_6: Zombie = Zombie {
family: &BB_BASIC,
tier: 6,
speed: 0.26,
armor: &[
NO_HELMET,
Chestplate(3,false,Leather(0x000000)),
Leggings(2,false,Leather(0x000000)),
Boots(1,false,Leather(0x000000)),
],
weapon: &STONE_AXE,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_SZ_1: Zombie = Zombie {
family: BB_SLIME_ZOMBIE,
family: &BB_SLIME_ZOMBIE,
tier: 1,
speed: 0.3,
armor: [
armor: &[
SLIME_HEAD,
Chestplate(3,false,Leather(0x55FF55)),
Leggings(2,false,Leather(0x55FF55)),
Boots(1,false,Leather(0x55FF55)),
],
weapon: SLIME_BALL,
weapon: &SLIME_BALL,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_S_1: Zombie = Zombie {
family: BB_SLIME,
family: &BB_SLIME,
tier: 1,
speed: 0.36,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
NO_LEGGINGS,
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_WI_1: Zombie = Zombie {
family: BB_WITCH,
family: &BB_WITCH,
tier: 1,
speed: 0.25,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
NO_LEGGINGS,
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::Ability(Ability::Double("splash potion of Harming", "splash potion of Poison")),
};
pub const BB_WO_1: Zombie = Zombie {
family: BB_WOLF,
family: &BB_WOLF,
tier: 1,
speed: 0.36,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
NO_LEGGINGS,
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_WW_1: Zombie = Zombie {
family: BB_WEREWOLF,
family: &BB_WEREWOLF,
tier: 1,
speed: 0.3,
armor: [
armor: &[
WERE_HEAD,
Chestplate(3,false,Leather(0x555555)),
Leggings(2,false,Leather(0x555555)),
Boots(1,false,Leather(0x555555)),
],
weapon: STONE_SWORD,
weapon: &STONE_SWORD,
children: Children::None,
damage_type: DamageType::Melee,
};
pub const BB_P_1: Zombie = Zombie {
family: &BB_PIGMAN,
tier: 1,
speed: 0.33,
armor: &[
NO_HELMET,
GOLDEN_CHESTPLATE,
GOLDEN_LEGGINGS,
GOLDEN_BOOTS,
],
weapon: &GOLD_SWORD,
children: Children::None,
damage_type: DamageType::Melee,
};
@ -260,7 +324,7 @@ pub const BB_WW_1: Zombie = Zombie {
pub const BB_LILY: Zombie = Zombie {
family: Family {
family: &Family {
name: "bb_lore",
damage: 3,
health: 55,
@ -269,13 +333,13 @@ pub const BB_LILY: Zombie = Zombie {
},
tier: 1,
speed: 0.3,
armor: [
armor: &[
LILY_HEAD,
CHAIN_CHESTPLATE,
CHAIN_LEGGINGS,
CHAIN_BOOTS
],
weapon: STONE_SWORD,
weapon: &STONE_SWORD,
children: Children::Single(&Horde {
zombie: BB_ELLIE,
count: 1,
@ -283,7 +347,7 @@ pub const BB_LILY: Zombie = Zombie {
damage_type: DamageType::Melee,
};
pub const BB_ELLIE: Zombie = Zombie {
family: Family {
family: &Family {
name: "bb_lore",
damage: 4,
health: 30,
@ -292,13 +356,13 @@ pub const BB_ELLIE: Zombie = Zombie {
},
tier: 0,
speed: 0.38,
armor: [
armor: &[
NO_HELMET,
NO_CHESTPLATE,
NO_LEGGINGS,
NO_BOOTS,
],
weapon: NO_WEAPON,
weapon: &NO_WEAPON,
children: Children::None,
damage_type: DamageType::MeleeAbility(Ability::Single("poop")),
};