Encounter

Encounters are battles with enemies that will either happen at random or in predetermined locations. To end the encounter, the enemies present must be either killed or spared. Alternatively, fleeing can also end the battle, but there is a probability of it failing.

During an encounter, the options FIGHT, ACT, ITEM, and MERCY, the name chosen at the beginning of the game, LV, and HP are all visible.

Protagonist's Turn
In the middle of the screen, some text is displayed:
 * At the start of the encounter, flavor text is given on the nature of the encounter (e.g. "Whimsun approached meekly!")
 * After the first turn, the flavor text usually describes one of the monsters in battle, which may change depending on the ACT options the protagonist has chosen.

FIGHT
The protagonist is prompted to pick a monster to attack. The protagonist can attack one monster each turn.
 * If a monster can be spared to remove them from battle, their name will be colored.
 * Selecting FIGHT will trigger a quick-time-event in which 1 bar (or more with certain items) slides across a meter, and "Z" must be pressed in order to attack. Hitting "Z" while the bar is at the center mark causes the most damage.
 * Allowing the bar(s) to slide all the way across the meter results in them fading out, and a miss. This is equivalent to selecting Spare, except that it will not cause any monsters to leave the battle.
 * The protagonist's weapon determines the speed and number of bars, as well as the effect that plays after an attack if it is to succeed.
 * If the attack depletes the monster's health, then they are killed and removed from battle. All normal monsters take a minimum of one or two hits to die, while bosses take much more, although it is possible to kill a monster boss in one hit during a Genocide Route.
 * Once a monster's HP is low enough, they can be spared. This can be used to end a battle peacefully, with certain bosses like Toriel being an exception, as her health cannot be lowered far enough without killing her.

ACT
The protagonist is prompted to select a monster, then they are given one or more Act options which are specific to that monster: If a monster can be spared, then their name will be colored.
 * The protagonist can always Check any monster in the encounter, however there are exceptions (such as some Amalgamates).
 * ACTing is another way to end battles peacefully (And is usually the tactic pacifist players use as opposed to FIGHTing).
 * In some situations, ACTing will end the next turn immediately and the monster can be spared.
 * ACTs may need to be performed in a certain order to allow a monster to be spared (e.g. sparing Greater Dog).

ITEM

 * Using consumable items regains health.
 * Using equipment items other than the Bandage or Stick equips them.
 * Using the Bandage acts like any other consumable item.
 * Using the Stick throws it - sometimes this has interesting or beneficial results, such as instantly allowing to spare dog-type creatures or boosting Mettaton EX's show ratings. The protagonist keeps the stick.

MERCY

 * Selecting Spare will remove any monster from battle if their name is colored.
 * The spare color begins as yellow, but can be changed to white and finally pink by talking to a Froggit in the midway point of the Ruins.
 * However, some monsters, notably bosses, may require the protagonist to continue sparing even if their name is not colored in order to progress their battle peacefully. According to the aforementioned Froggit, sparing means that the protagonist does not want to fight.
 * If the Spare option is not colored, selecting it does nothing.


 * Selecting Flee will make an attempt to escape the encounter. If they are successful, then the protagonist's heart is shown walking away, and the game returns to the overworld.

Enemy's Turn
The enemy may have some dialogue before attacking; the protagonist can skip the dialogue using "X" if there is any. In some situations (Such as when the dialogue plays at a slower pace), however, the dialogue cannot be skipped.

The protagonist's SOUL is placed in the middle of the Bullet Board (Or in other locations in some situations, such as when Reaper Bird attacks). The enemy attacks the SOUL in the box. The SOUL can be controlled using arrow keys.

In most boss battles (and the mini-boss Muffet) the color of the SOUL is changed to a certain color (See Soul Modes).

The attack colors of the enemies can also change in certain battles (see Attack Types).

The shape of the bullets used in enemy attacks vary, depending on the enemy being fought. When multiple enemies are fought, their attacks overlap in the Bullet Board, but each is less intense.

Interestingly enough, Sans is the only enemy who has the first turn out of all other encounters.

End Conditions
An encounter may end through the following ways:

Win
All monsters are removed from battle. EXP and GOLD are rewarded depending on the monster(s) fought and whether the protagonist killed the monster(s).

Monsters that are removed from battle are either greyed out with a certain sprite or absent from the battlefield.

Note that during the True Pacifist Ending Credits, monster names and descriptions appear as either white or yellow. Some monsters require to be spared in a certain way at least once for their names to appear yellow.

Lose
The protagonist's HP reaches 0—this results in a game over and the game loads to the last save point before the encounter. There are some exceptions when it comes to the SAVEs at certain points in the game (such as the elevators in Hotland). The outcome of a Loss also has exceptions, such as during Photoshop Flowey's and Asriel's fights.

Flee
The protagonist flees from battle. There is no reward for fleeing in itself, but the protagonist returns to the overworld, which usually allows them to continue through the area. The protagonist is rewarded with EXP and/or gold for any monsters that have been killed or spared before fleeing.

After fleeing, the possibility for encounters is higher, and the next encounter will feature the same monsters that were previously fled from. The possibility for encounters will remain elevated until the monsters are spared.

Trivia

 * Screenshots of an earlier version of Undertale when it was called "UnderBound 2" reveal that "ACT" was originally called "TALK", "MERCY" was originally called "SPARE", and a "SPELL" button was planned to be included but was scrapped. This asset can still be found inside the game's files.
 * When pressing "X" during the protagonist's turn, the SOUL moves slower.