#259 let monsters use potions of might and berserk rage

Robert Vollmert

These allow monsters to drink potions of might and berserk rage.

A new enchantment type ENCH_MIGHT is added, as well as beams BEAM_MIGHT and BEAM_BERSERK. ENCH_MIGHT acts as a sub-enchantment of ENCH_BERSERK like ENCH_HASTE does. Some cleanup of monster enchantment timeout messages as well, which required reordering ench_type.


  • jpeg

    Do I read this right that monsters use tension to decide when they need to drink might or rage?

  • No, tension is just increased in the presence of berserk monsters, and I added a slight tension increase for mighted monsters. That was my intention, at least.

    The idea is interesting, though!

  • Okay, I really should have looked at your patches rather than go by their titles. :)

    What I was asking was basically, how does a monster decide drinking a potion of might/berserk might be a good idea? Most of the time, when facing the player quaffing a powerful potion is always better than not quaffing it as long as it will have an effect. That said, berserk needs a can_go_berserk() check, both in can_drink_potion() and should_drink_potion(). That should also take care of monsters picking up the appropriate potions.

    One condition that would make sense is having a clear path to the target (i.e. not seeing it through glass or across a lake), and the monster should not be fleeing. Spellcasters should probably be exempted from quaffing !berserk (or have a lower chance) in can_drink_potion(), and for ranged fighters it should only return true if they are in melee range.

    As you can see I really like the addition!


  • With the patches I submitted, they're treated exactly the same as potions of speed. You're probably right in that that causes suboptimal behaviour like spellcasters and ranged attackers berserking. I'll try to add a little more intelligent choices there.

  • The last patch should make monsters only use the new potions where it makes sense.

  • Very cool, thanks!

    can_drink_potion() still needs a can_go_berserk() (and spellcaster) check, so monsters that won't ever quaff !berserk can't be generated with it or pick it up. Otherwise, I think we can use this. We could add more conditions, but that can be ironed out through gameplay.


  • Added that.

    • status: open --> closed-accepted