npc_attack_tweaks

This commit is contained in:
flo 2023-06-03 14:04:10 +00:00 committed by Samuel Keiffer
parent f7688462a1
commit 53288d0b22
5 changed files with 11 additions and 7 deletions

View File

@ -2,7 +2,7 @@ BasicSummon(
buildup_duration: 0.2, buildup_duration: 0.2,
cast_duration: 0.3, cast_duration: 0.3,
recover_duration: 0.3, recover_duration: 0.3,
summon_amount: 1, summon_amount: 2,
summon_distance: (4, 4), summon_distance: (4, 4),
summon_info: ( summon_info: (
body: Arthropod(( body: Arthropod((

View File

@ -3,7 +3,7 @@ SelfBuff(
cast_duration: 0.8, cast_duration: 0.8,
recover_duration: 0.3, recover_duration: 0.3,
buff_kind: ProtectingWard, buff_kind: ProtectingWard,
buff_strength: 2.0, buff_strength: 0.7,
buff_duration: Some(300.0), buff_duration: Some(25.0),
energy_cost: 0, energy_cost: 0,
) )

View File

@ -6,7 +6,7 @@ BasicAura(
auras: [ auras: [
( (
kind: Regeneration, kind: Regeneration,
strength: 10.0, strength: 18.0,
duration: Some(5), duration: Some(5),
category: Magical, category: Magical,
), ),

View File

@ -11,7 +11,7 @@ BasicRanged(
), ),
projectile_body: Object(SpectralSwordSmall), projectile_body: Object(SpectralSwordSmall),
projectile_speed: 20.0, projectile_speed: 20.0,
num_projectiles: 36, num_projectiles: 12,
projectile_spread: 0.4, projectile_spread: 0.4,
move_efficiency: 0.3, move_efficiency: 0.3,
) )

View File

@ -4287,8 +4287,12 @@ impl<'a> AgentData<'a> {
controller.push_basic_input(InputKind::Ability(1)); controller.push_basic_input(InputKind::Ability(1));
} }
} else if attack_data.dist_sqrd > (4.0 * attack_data.min_attack_dist).powi(2) { } else if attack_data.dist_sqrd > (4.0 * attack_data.min_attack_dist).powi(2) {
// if enemy is far, heal // if enemy is far, heal and shoot bombs
if agent.action_state.timers[ActionStateTimers::TimerDagon as usize] > 2.0 {
controller.push_basic_input(InputKind::Primary);
} else {
controller.push_basic_input(InputKind::Ability(2)); controller.push_basic_input(InputKind::Ability(2));
}
agent.action_state.timers[ActionStateTimers::TimerDagon as usize] += read_data.dt.0; agent.action_state.timers[ActionStateTimers::TimerDagon as usize] += read_data.dt.0;
} else if entities_have_line_of_sight( } else if entities_have_line_of_sight(
self.pos, self.pos,