Add parched

Parched: the desert skeleton with 16 health, a 70-tick bow interval and arrows of weakness for 30 seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-09 10:17:37 +02:00
parent 52ed65a0d7
commit bb06b17303
5 changed files with 36 additions and 4 deletions
+2
View File
@@ -97,6 +97,7 @@ pub fn family(s: Species) -> Family {
| S::Skeleton
| S::Stray
| S::Bogged
| S::Parched
| S::WitherSkeleton
| S::ZombifiedPiglin => Family::Undead,
S::Creeper | S::Spider | S::CaveSpider => Family::Hostile,
@@ -515,6 +516,7 @@ fn custom_server_ai_step(m: &mut Mob, cx: &mut Cx) {
| Species::Skeleton
| Species::Stray
| Species::Bogged
| Species::Parched
| Species::WitherSkeleton
| Species::ZombifiedPiglin => undead::custom_server_ai_step(m, cx),
Species::Enderman => super::enderman::custom_server_ai_step(m, cx),
+5 -1
View File
@@ -823,7 +823,11 @@ fn held_items(
) {
let skeleton = matches!(
m.species(),
Species::Skeleton | Species::Stray | Species::Bogged | Species::WitherSkeleton
Species::Skeleton
| Species::Stray
| Species::Bogged
| Species::Parched
| Species::WitherSkeleton
);
if !super::illager::shows_item(m) {
return;
+21 -1
View File
@@ -52,6 +52,7 @@ pub enum Species {
Skeleton,
Stray,
Bogged,
Parched,
WitherSkeleton,
Creeper,
Spider,
@@ -713,6 +714,20 @@ pub const ALL: &[Def] = &[
Some("entity.stray.step"),
Baby::None
),
def!(
Parched,
"parched",
"parched#main",
"entity/skeleton/parched",
A::Skeleton,
[
"entity.parched.ambient",
"entity.parched.hurt",
"entity.parched.death"
],
Some("entity.parched.step"),
Baby::None
),
def!(
Bogged,
"bogged",
@@ -1178,6 +1193,7 @@ impl Def {
| S::Skeleton
| S::Stray
| S::Bogged
| S::Parched
| S::WitherSkeleton
| S::ZombieHorse
| S::SkeletonHorse
@@ -1241,6 +1257,7 @@ impl Def {
| S::Skeleton
| S::Stray
| S::Bogged
| S::Parched
| S::Phantom
),
undead,
@@ -1280,6 +1297,7 @@ impl Def {
| S::Skeleton
| S::Stray
| S::Bogged
| S::Parched
| S::WitherSkeleton
| S::Creeper
| S::Spider
@@ -1413,7 +1431,9 @@ impl Def {
Species::Zombie | Species::Husk | Species::Drowned | Species::ZombieVillager => {
Brain::Zombie
}
Species::Skeleton | Species::Stray | Species::Bogged => Brain::Skeleton,
Species::Skeleton | Species::Stray | Species::Bogged | Species::Parched => {
Brain::Skeleton
}
Species::Spider | Species::CaveSpider => Brain::Spider,
Species::Creeper => Brain::Creeper,
_ => Brain::Passive,
+7 -2
View File
@@ -74,7 +74,7 @@ pub fn register(m: &mut Mob) {
t.add(3, NearestTarget::species(&[S::Axolotl], true).interval(10));
m.ai.nav.can_float = false;
}
S::Skeleton | S::Stray | S::Bogged | S::WitherSkeleton => {
S::Skeleton | S::Stray | S::Bogged | S::Parched | S::WitherSkeleton => {
let species = m.species();
let g = &mut m.ai.goals;
g.add(2, RestrictSun);
@@ -107,7 +107,11 @@ pub fn register(m: &mut Mob) {
m.ai.goals.add(4, MeleeAttack::new(1.2, false));
} else {
m.extra.main_hand = Some("minecraft:bow".into());
let interval = if m.species() == S::Bogged { 70 } else { 40 };
let interval = if matches!(m.species(), S::Bogged | S::Parched) {
70
} else {
40
};
m.ai.goals.add(4, BowAttack::new(1.0, interval, 15.0));
}
}
@@ -398,6 +402,7 @@ pub fn perform_ranged_attack(m: &mut Mob, who: Who, cx: &mut Cx, power: f32) {
let effect = match m.species() {
Species::Stray => Some(("minecraft:slowness", 600)),
Species::Bogged => Some(("minecraft:poison", 100)),
Species::Parched => Some(("minecraft:weakness", 600)),
_ => None,
};
let mut p = Projectile::new(
+1
View File
@@ -66,6 +66,7 @@ fn undead(s: Species) -> bool {
| Species::Skeleton
| Species::Stray
| Species::Bogged
| Species::Parched
| Species::WitherSkeleton
| Species::ZombieHorse
| Species::SkeletonHorse