From 4aa623d6c2aa0ed37241aad942aa0ffeb7b8394c Mon Sep 17 00:00:00 2001 From: Knightress Paladin Date: Wed, 7 Jul 2021 19:21:30 -0700 Subject: [PATCH] Added check to prevent sceptre AI from canceling its own ward --- CHANGELOG.md | 1 + server/src/sys/agent.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df44305925..4a57352297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ability to toggle chat visibility - Added gem rings with various stat improvements. - Animations for using consumables. +- AI for sceptre weilders and sceptre cultists in Tier 5 dungeons ### Changed diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index f7ae3302d0..711fdc5d83 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -2495,8 +2495,8 @@ impl<'a> AgentData<'a> { .push(ControlAction::basic_input(InputKind::Primary)); } } - // Logic to move. Intentionally kept separate from ability logic so duplicated - // work is less necessary. + // Logic to move. Intentionally kept separate from ability logic where possible + // so duplicated work is less necessary. if attack_data.dist_sqrd < (2.0 * attack_data.min_attack_dist).powi(2) { // Attempt to move away from target if too close if let Some((bearing, speed)) = agent.chaser.chase( @@ -2547,6 +2547,7 @@ impl<'a> AgentData<'a> { } // Sometimes try to roll if self.body.map(|b| b.is_humanoid()).unwrap_or(false) + && !matches!(self.char_state, CharacterState::BasicAura(_)) && attack_data.dist_sqrd < 16.0f32.powi(2) && thread_rng().gen::() < 0.01 {