This is the editor screen for attack targets and aiming.

Use the Up and Down arrow keys (or PgUp, PgDn, Home, and End) to navigate through the menu.

Use the Left and Right arrow keys to change values, or you can type in numbers.

You can also hold the ALT key and press the left and right arrow keys to change which attack you are editing, or while holding ALT you can type an attack ID number.

Aim Math: Determines the chance for the attack to hit the target. For Normal, Poor, and Bad aiming, the attacker's Aim and target's Dodge stats are first modified by some multipliers then random values nearby (+/- 75%) to those values are compared. So if the Aim and Dodge stats are equal, for 'Bad' aiming there is a 50% chance to hit. Here is an explanation of other accuracy values.

-Never Misses: Ensures that the
  attack always hits no matter what.
  (It might still fail due to other
  conditions.) Great for many
  purposes, such as healing spells
  or attacks that serve other
  purposes.

-Magic: Uses different stats to
  emphasize magical aptitude and
  enemy resistace to magic to
  determine whether an attack hits,
  rather than normal accuracy stats.
  Its use is rather self-explanatory.

-Percentage based formulas: These
  formulas use the stats as
  percentages out of 100 to determine
  the success rate of attacks.  The
  symbol * here means that the first
  percentage is taken into account,
  and then if it was successful the
  second percentage is used to decide
  if the target avoided the attack.


Target Class: This controls who the attack can be used on.

NOTE: When an attack is used outside of battle, most target classes are treated equivalent to "Ally (not dead)". The exceptions are Self, Ally not self, Ally (including dead), Dead Ally and All (including dead).

* Foe (not dead) - For heroes this
  means the attack is targetted to
  enemies. For enemies this means
  that the attack is targetted to
  heroes.

* Ally (not dead) - For heroes this
  means that the attack is targeted
  to heroes (including self).  For
  enemies this means that the attack
  is targetted to enemies.

* Self - This means the attack can
  only be targetted to the attacker.

* All (not dead) - This means the
  attack can be targeted to anyone,
  hero or enemy, except dead heroes.

* Ally (including dead) - For heroes
  this means that the attack can
  target any hero including the ones
  who are already dead, and self.
  This is intended for "Life" potions
  or spells. For enemies, this is no
  different from "Ally".

* Ally not self - Just like "Ally"
  but the attacker is not permitted
  to target itself. Only team-mates
  can be targetted.

* Revenge (last to hurt attacker) -
  This means the attack can only
  target the last hero or enemy that
  has dealt damage (to any stat) to
  the attacker.
  Warning: normally you should use
  Counter instead of Revenge for
  counterattacks, in case the attack
  missed or failed.
  (Attacks which do no damage, or
  "Show damage without inflicting"
  don't count! Also, "Reset poison/
  stun/etc register" and "Reset
  target stat to max before hit" bits
  are both ignored for the purpose
  of determining whether the attack
  hurt/cured - the latter is a bug!)

* Revenge (whole battle) - This means
  the attack can target any hero or
  enemy who has dealt damage to the
  attacker over the course of the
  entire battle.
  (See "Revenge (last to...)" for
  caveats.)

* Previous target(s) - This means the
  attack can only target the same
  targets as whatever attack was most
  recently used by the attacker
  (only the actual targets for that
  attack, not the possible ones - so
  only one target unless it was a
  spread attack).

* Recorded (stored) targets -
  This means that the attack will
  only be able to target any targets
  that the attacker has previously
  hit with an attack that has the
  "Store Target" bitset turned
  on. If no "Store Target" attack
  has been used by the attacker,
  then the attacker will not be able
  to use this attack at all.

* Dead Ally (hero only) - This
  attack can only target dead heroes.
  If no heroes are dead, the attack
  will be unusable. The attack cannot
  be used by enemies because unlike
  heroes, dead enemies are totally
  removed from the battle.

* Thankvenge (last to cure attacker)
  This means the attack will only be
  able to target the last hero or
  enemy who cured the attacker
  (increased any of their stats). If
  the attacker has not been cured in
  the current battle, the attack will
  be unusable.
  (See "Revenge (last to...)" for
  caveats.)

* Thankvenge (whole battle) - This
  means the attack will be able to
  target any hero or enemy who has
  cured the attacker (increased any
  of their stats) over the course of
  the entire battle. If the attacker
  has never been cured, the attack
  will be unusable.
  (See "Revenge (last to...)" for
  caveats.)

* Counter (last to hit attacker)
  The attack will be directed at the
  last enemy or hero to target this
  attacker, regardless of whether it
  hurt, cured, did no damage,
  missed, failed or whatever.  This
  should be used for counterattacks.

* All (including dead heroes) -
  Allows attacking anyone, including
  dead heroes and self. Dead enemies
  vanish so can't be targetted.

* Dead Foe (dead heroes only) - This
  attack can only target dead heroes
  and can only be used by enemies. If
  no heroes are dead, the attack will
  be unusable. The attack cannot be
  used by heroes because dead enemies
  are totally removed from battle.

* Foe (including dead heroes) - When
  used by an enemy this attack can
  target dead or alive heroes. When
  used by a hero it can target
  enemies. (Dead enemies are totally
  removed from battle.)

* Spawned by last attack - Can only
  target an enemy that was spawned
  by the most recent attack. This
  is only useful when chained from
  an attack that spawnes an enemy
  (Note this only refers to enemies
  spawned directly from an attack,
  not enemies that are spawned by
  an enemy in response to an attack)

Target Setting: This controls how the attack can be targetted if more than one valid target is available in the chosen target class.

* Focused - This means that only one
  target can be chosen.

* Spread - This means the attack will
  target all available valid targets
  within the target class.

* Optional Spread - This means the
  attacker will have the choice of
  whether they want to choose a
  single target or all available
  targets. If the attack is chained
  to from another attack then the
  attack doesn't get a choice.
  Instead it hits all targets 33% of
  the time, otherwise a random one.

* Random Roulette - Like "Focus" this
  chooses only a single target, but
  the player will not be able to
  choose which target because the
  targetting cursor will rapidly
  change until they press Confirm.
  If used by an enemy, this is not
  any different from "Focus", and if
  chained to from another attack, it
  will simply pick a random target.

* First Target - This always targets
  the first valid target in the
  target class. It is not random.

Prefer Target: For heroes, this affects which target the target selection cursor starts on. For enemies this affects which target the enemy will choose from its available targets.

* Default - For heroes, starts the
  cursor on the first valid target.
  For enemies, the enemy will choose
  a random target.

* First - For heroes this is the same
  as "default". For enemies they will
  always choose the first valid
  target.

* Closest - Chooses the target
  closest to the attacker.

* Farthest - Chooses the target
  farthest away from the attacker.

* Random - For heroes, starts the
  cursor on a random valid target.
  For enemies this is the same as
  "default".

* Weakest - Chooses the target with
  the weakest stat. The stat is
  chosen below.

* Strongest - Chooses the target with
  the strongest stat. The stat is
  chosen below.

* Weakest% - Chooses the target with
  the weakest stat as a percentage of
  the target's maximum for that
  attack.

* Strongest% - Chooses the target
  with the strongest stat as a
  percentage of the target's maximum
  for that stat.

Weak/Strong Stat: This only applies if you have chosen "weakest" "strongest" "weakest%" or "strongest%" as the "Prefer Target" setting. Valid values are "same as target stat", or any specific stat, or any affliction register such as "poision" or "mute".


Note that if the attack is used as part of a chain, and both the target class and the target setting are the same as the previous attack, and the preferred target is "Default" then the attack will use the exact same target as the previous attack.

If you have a Spread attack A and a Focused attack B which both chain to attack C, and you want C to hit the same targets as the previous attack then set its Target Class to Previous Target(s) and Target Setting to Spread.
