oskarwiksten/andors-trail — pull request #19 by daniel-santos (2013-12-06 00:43:39+00:00)
Title: Add auto-attack and improve confirm attack

Hey there. So this is my first time to try to do a pull request in git, so I hope I do it right. :) Sorry about the lines where Eclipse wanted to re-order your imports, I removed most of those, but not sure how to tell it to leave that stuff alone. Oh yeah, I forgot to mention in the original patch message that I've moved encounter difficulty into an Enum (with a little functionality on the side) but I'm not certain of the best place for it, so I stuck it under .util.

Anyway, here's the original patch message:

This patch allows the player to specify in their preferences a
difficulty threshold for attack confirmations. Thus, if you specify
'Normal', you will be prompted when attacking monsters of normal or
higher difficulty, but not easy or very easy. The options 'always' and
'never' implement the old boolean behavior.

Second, this adds an auto-attack setting that tells the game engine to
attempt to attack monsters as soon as you move next to them. In the
preference interface, the player specifies the most difficult encounter
that they want to auto-attack. Prior to auto-attacking, an aggressive
monster will still get a chance to attack first. This modification only
acts after the player has moved; if a player is stationary and a
monster moves near them, they still must manually attack.