mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Clean up sceptre ai code before merge
This commit is contained in:
parent
63c5d9f7df
commit
65d67ef781
@ -5,6 +5,11 @@ EntityConfig (
|
||||
loot: Some(LootTable("common.loot_tables.dungeon.tier-5.enemy")),
|
||||
|
||||
main_tool: Some(Choice([
|
||||
(1.0, Some(Item("common.items.weapons.axe_1h.orichalcum-0"))),
|
||||
(2.0, Some(Item("common.items.weapons.sword.cultist"))),
|
||||
(1.0, Some(Item("common.items.weapons.hammer.cultist_purp_2h-0"))),
|
||||
(1.0, Some(Item("common.items.weapons.hammer_1h.orichalcum-0"))),
|
||||
(1.0, Some(Item("common.items.weapons.bow.velorite"))),
|
||||
(1.0, Some(Item("common.items.weapons.sceptre.sceptre_velorite_0"))),
|
||||
])),
|
||||
second_tool: None,
|
||||
|
@ -1632,7 +1632,6 @@ impl<'a> AgentData<'a> {
|
||||
"Axe Simple" | "Sword Simple" => Tactic::Sword,
|
||||
"Staff Simple" => Tactic::Staff,
|
||||
"Bow Simple" => Tactic::Bow,
|
||||
"Sceptre Simple" => Tactic::Sceptre,
|
||||
"Stone Golem" => Tactic::StoneGolem,
|
||||
"Quad Med Quick" => Tactic::CircleCharge {
|
||||
radius: 3,
|
||||
@ -2467,7 +2466,6 @@ impl<'a> AgentData<'a> {
|
||||
.peek()
|
||||
.is_some()
|
||||
})
|
||||
&& thread_rng().gen_bool(0.4)
|
||||
{
|
||||
// Use ward if target is far enough away, self is not buffed, and have
|
||||
// sufficient energy
|
||||
@ -2482,11 +2480,11 @@ impl<'a> AgentData<'a> {
|
||||
.push(ControlAction::basic_input(InputKind::Primary));
|
||||
}
|
||||
} else if attack_data.dist_sqrd < (2.0 * attack_data.min_attack_dist).powi(2) {
|
||||
if self.body.map(|b| b.is_humanoid()).unwrap_or(false)
|
||||
if self.body.map_or(false, |b| b.is_humanoid())
|
||||
&& self.energy.current() > CharacterAbility::default_roll().get_energy_cost()
|
||||
&& !matches!(self.char_state, CharacterState::BasicAura(c) if !matches!(c.stage_section, StageSection::Recover))
|
||||
{
|
||||
// Else roll away if can roll and have enough energy, and not using beam or in
|
||||
// Else roll away if can roll and have enough energy, and not using aura or in
|
||||
// recover
|
||||
controller
|
||||
.actions
|
||||
|
Loading…
Reference in New Issue
Block a user