diff --git a/assets/common/items/npc_armor/golem/claygolem.ron b/assets/common/items/npc_armor/golem/claygolem.ron new file mode 100644 index 0000000000..8ba9a70e4c --- /dev/null +++ b/assets/common/items/npc_armor/golem/claygolem.ron @@ -0,0 +1,13 @@ +ItemDef( + name: "Clay Golem Armor", + description: "Worn by clay golem.", + kind: Armor(( + kind: Chest("Clay Golem"), + stats: ( + protection: Normal(180.0), + poise_resilience: Normal(1.0), + ), + )), + quality: Legendary, + tags: [], +) \ No newline at end of file diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index aebc1468d8..91d386a04b 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -568,7 +568,7 @@ impl Body { }, Body::BipedSmall(_) => 10, Body::Object(_) => 10, - Body::Golem(_) => 260, + Body::Golem(_) => 0, Body::Theropod(_) => 20, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 20, @@ -602,6 +602,7 @@ impl Body { pub fn immune_to(&self, buff: BuffKind) -> bool { match buff { BuffKind::Bleeding => matches!(self, Body::Object(_) | Body::Golem(_) | Body::Ship(_)), + BuffKind::Burning => matches!(self, Body::Golem(_)), _ => false, } } diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index ee6fbf54a1..7d10f86449 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -980,6 +980,15 @@ impl LoadoutBuilder { .build(), _ => LoadoutBuilder::new().active_item(active_item).build(), }, + Body::Golem(g) => match g.species { + golem::Species::ClayGolem => LoadoutBuilder::new() + .active_item(active_item) + .chest(Some(Item::new_from_asset_expect( + "common.items.npc_armor.golem.claygolem", + ))) + .build(), + _ => LoadoutBuilder::new().active_item(active_item).build(), + }, _ => LoadoutBuilder::new().active_item(active_item).build(), } }; diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index c0cf48bfa0..f0ee1b698e 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -139,7 +139,7 @@ impl CharacterBehavior for Data { specifier: self.static_data.specifier, }; let body_offsets_z = match data.body { - Body::BirdLarge(_) | Body::Golem(_) => data.body.height() * 0.9, + Body::BirdLarge(_) | Body::Golem(_) => data.body.height() * 0.8, _ => data.body.height() * 0.5, }; // Gets offsets diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index d9ed1229c7..4bf3099533 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1647,6 +1647,18 @@ impl<'a> AgentData<'a> { ), ) } + Tactic::ClayGolem if matches!(self.char_state, CharacterState::BasicRanged(_)) => { + const ROCKET_SPEED: f32 = 20.0; + aim_projectile( + ROCKET_SPEED, + Vec3::new(self.pos.0.x, self.pos.0.y, self.pos.0.z + eye_offset), + Vec3::new( + tgt_data.pos.0.x, + tgt_data.pos.0.y, + tgt_data.pos.0.z + tgt_eye_offset, + ), + ) + }, _ => Dir::from_unnormalized( Vec3::new( tgt_data.pos.0.x, @@ -3493,8 +3505,6 @@ impl<'a> AgentData<'a> { } else if attack_data.dist_sqrd < GOLEM_LONG_RANGE.powi(2) { if target_speed_sqd < GOLEM_TARGET_SPEED.powi(2) { // If target is far-ish and moving slow-ish, rocket them - // TODO: Maybe some look_dir shenanigans? Also maybe use condition so they - // stop and aim a bit first? controller .actions .push(ControlAction::basic_input(InputKind::Ability(1)));