JCoxeye's Guide to Fighting Sans

A comprehensive guide to fighting Sans, the final boss of the Genocide/No Mercy route.

Preface

Sans Undertale.
The ultimate test of any True Undertale Gamer.

Sands Thundersnail is quite the challenge, especially if you don't know what to expect, nor how the fight even works.

That's where this guide comes in.

Below, I will explain the mechanics of Sadge Trogdorfail's fight, which strategies work and which don't, and show all of his attacks.

This guide limits spoilers for the remainder of the No Mercy route, but it does have a section related to Speedrunning, found at the bottom of the page.

The following sub-sections will be organized by their relevance to the average player.

The Basics

Chives Mustardkale has only 1 HP, 1 ATK, and 1 DEF, so he would normally be a very easy enemy.

To make up for this, he bends the rules of the game to get an advantage:

Some other important notes:

Equipment

Given Franz Ferdinand's STATs and unique mechanics, ATK and DEF are useless against him - DF doesn't reduce the damage you take, and AT doesn't affect the turn length of the battle.

With that, the only weapons and armor that affect the battle are ones that give special effects, those being:

Finally, using both the Torn Notebook and Cloudy Glasses at the same time reduces damage even further (preventing roughly ~1/9 of damage taken), and slows the rate at which KARMA is converted to damage.

Given all of that, which should you choose?

Well, given that the Cloudy Glasses are the only armor item that actually do anything against Cans, you should always be using them.

As for the weapon, most say that the Burnt Pan is the best, but they're likely unaware of the effect that INV has during the fight.

The other useful weapon to use is the Torn Notebook, which effectively gives you more defense, while also slowing the rate at which KARMA drains your HP.

Either choice is valid, but I would suggest the Torn Notebook:
The extra ~25-30 HP you'll get via the Burnt Pan is probably not much more than the HP you'll save by taking less damage, if at all. Plus, healing loses you a turn, and in my experience, most people beat Pan's Worsethanbook with a consumable or two left in their inventory anyway.

Speaking of...

Consumables

In the MTT Resort, one can buy Legendary Heroes, which heal 40 HP.
With that, the only relevant consumables are ones that heal more than 40 HP, or have special effects:

Provided you haven't used the Pie, Instant Noodles, or Snowman Pieces, you should have three spaces open for Legendary Heroes and/or Sea Tea.

If you've already used the Snowman Pieces, don't worry - having at most 15 less HP to work with isn't a big deal.
If you've already used the Pie or Instant Noodles, may The Angel have mercy on your SOUL.

As for the remaining spaces in your inventory, just fill them up with Legendary Heroes.

Trading a Legendary Hero for a Sea Tea to get the SPEED bonus is often recommended, as it can be a lifesaver for his harder attacks.
I'd say two Sea Teas is too much however, as sacrificing 30 HP for diminishing returns really isn't worth it.

Dodging Attacks

Arright. This is what you've been waiting for.

There's quite a high demand for guides for these attacks, as this is by far the most difficult fight in the game.
You can even find a whole online simulator for this!

Of course, that so-called 'bad time simulator' is just a simulator - it doesn't show you the Pro Gamer Strats!
and also the emulation is terrible oh my god why is it like that

Anyway, here's all of Stan Millvale's, and strategies for each!

From here until you attack him for the 13th time, Jevil Deltarune reuses his attacks, randomly choosing from one of these four:

Small Hops 2, Horizontal Bone Slide, Random Hops 2, and Faster Blaster Platforms.

Anyway, this here's the halfway point - if you want to duck out to avoid spoilers for the rest of the fight, this is a great place to stop.

From here until you attack him for the 23rd time, Suds Rentalane reuses his attacks, randomly choosing from one of these three:

Gravity Slam 3, Mini Attacks 3, and Gaster Blasters.

On the Topic of INV and KARMA

If you're anything like me, discovering the niche specifics of random things in Undertale is a highly enjoyable experience, not to mention a vaguely useful one from a theorycrafting/speedrunning perspective.

This section will cover INV and KARMA in detail, explaining the intricacies of things that only the most brain-rotten of Undertale fans would care for.

What's INV?

Your INV STAT represents how long you're invincible after taking damage.

Your INV starts at 30 (1 second of invincibility), but you can get some more by equipping the Torn Notebook or Cloudy Glasses, bought from Gerson's shop in Waterfall.

The in-game descriptions of the Torn Notebook and Cloudy Glasses say they give 6 and 9 INV respectively, but upon equipping them, you'll notice that they clearly increase your INV STAT by much more than just 15 (1/2 of a second).

So... what's up with that?

Well, to put it bluntly, the statistics the game gives you are blatently false, and have literally nothing to do with the actual INV STAT.

Diving into the code, we can confirm the Torn Notebook (Shown as
global.weapon == 45
in the image below)
actually gives you an extra 15 INV, while the Cloudy Glasses (Shown as
global.armor == 44
in the image below)
give you an extra 30 INV.
Together, they provide 45 INV, giving you a total of 75 INV, or 2.5 seconds of invincibility after taking damage.

(gml_Object_obj_battlecontroller_Step_0) (?) As an aside, this code reveals that INV is always kept at a minimum of 15 (despite this being impossible to see in-game).

It also reveals that INV works differently against Undyne the Undying and Muffet, the latter of which relates to the lore of the Purple SOUL.

Okay, but how does INV work against Spans?

(gml_Object_obj_sansb_body_Draw_0)

This is the code that's largely responsible for how INV works against Grains Andtheseeds. It's a little more complicated than the last one, but here's how I think it works:

inv_timer (which starts at 0) is increased by 1 every frame.

If you don't have increased INV, then this doesn't do anything - you never get any i-frames.
If you do, though, then you'll be given one frame of invincibility every time the counter reaches a certain number, dependent on your INV:

Effectively, you're immune to Direct Damage (not KARMA) 1/5 of the time when using the Torn Notebook, 1/4 of the time when wearing the Cloudy Glasses, and 1/3 of the time when using both the Torn Notebook and the Cloudy Glasses.

What's KARMA?

When you're first hit by an attack, you'll be hit for 1 DMG and accrue a sizeable amount of KARMA, dependent on the attack's Innate KR. How much any given attack has is shown in the Attacks section.
Afterwards, for as long as you're in contact with the attack, you'll take an additional 1 DMG and 1 KR per frame, for a total of 30 Direct Damage and 30 KARMA per second. (?) For example, let's say you're hit by an attack that has 6 Innate KR, and are in contact with the attack for a third of a second (10 frames).

On the first frame, you'll be hit for 1 DMG and accrue 6 KR.

You'll then take another 1 DMG and 1 KR on each of the following 9 frames, for a total of 9 DMG and 9 KR.

Overall, you'll take 25 DMG: 10 from Direct Damage, and 15 from KARMA.

When you have KR, it is slowly converted to damage at a 1 KR:1 DMG ratio.

How do INV and KARMA interact?

Like this, obviously:

(gml_Object_obj_sansb_body_Draw_0)

This code is even more complicated, but here's how my smooth brain interprets it:

    Your KARMA is capped at 40, and then to 1 less than your current HP; you can't have more than 40 KR, nor more KR than HP.

    If you have some amount of KR and aren't dead, km_t (henceforth 'KARMA Timer') increases by 1 every frame.

    Depending on your current KR, the KARMA Timer is compared to one of several time limits. Once it meets that time limit, you'll take 1 Damage, lose 1 KR, and the KARMA Timer will be set back to 0.

In short, and as mentioned earlier, KARMA drains faster as you have more of it, and slower as you have more INV.

BUT WAIT JUST A [30 frames] !
THERE'S MORE!

Not only is it super complicated, but it's also bugged!

Looking at the code again:

(gml_Object_obj_sansb_body_Draw_0)

The code you see here is from the first part of Trans Cringefail's in-battle Draw Event. In GameMaker Language (GML), a Draw Event is how an object represents ('draws') itself on-screen.

If it seems strange that this code is inside of a Draw Event instead of a Step Event (the gameplay counterpart to Draw Events), then you'd be right.

I have no idea why Toby Fox made it this way.

As Draw Events are run every frame, the code that governs the KARMA Timer is run every 1/30th of a second. This would be fine on its own, if it weren't for the fact that the code that sets the KARMA Timer Bonus is also run every frame.

This means that while you have only one INV-boosting item equipped (I.e, you have 45 or 60 INV), km_bonus is randomly set to either 0 or 1 30 times per second.

You may have realized the problem.

If km_bonus is randomized each frame, then the variables that depend on it (such as the time limit that km_t needs to reach) will also be random each frame.
Given that km_t only needs to be above the time limit for a single frame, these random fluctuations are more than enough to cause KARMA to tick down and reset the timer.

Effectively:

The code is supposed to mean that, when you equip only one INV-boosting item, whether any given point of KARMA takes longer to tick down is random.

What ends up actually happening is that, once the KARMA Timer passes the minimum time limit, (That being the time limit if you weren't using any INV-boosting items) there's a chance for KARMA to tick down each frame until the maximum time limit (That being the time limit if you were using both INV-boosting items) is reached.

Ultimately, wearing only one INV-boosting item barely affects the rate at which KARMA is converted to damage.

Fun Factoids

Various fun facts and extraneae regarding the fight:

Speedrunning

In the Genocide category of Undertale, Sans Deltarune functions as the final skill-check between you and your (hypothetical) PB.

Of course, you'll have the Ballet Shoes and Bandage equipped, unless you've equipped another armor for safety.

Three things are important to get a good fight:

    Equip the Ballet Shoes:
    The Burnt Pan or Torn Notebook may be tempting, but the amount of time you lose to the longer attack animations isn't really worth it.
    Plus, if you need either of those to be safe during the fight, you should probably put in a bit more practice - you should be very confident in fighting Clash of Clans before running Geno.

    Don't waste any turns doing anything other than attacking:
    Aside from when he SPAREs you, healing will waste a turn, which is a lot of time to lose, especially against Hans Olo.
    Of course, if you absolutely need to heal, it's better to do so than die. Do recall that after you heal, the cursor will still be on the ITEM option. Try not to heal again, or worse, reequip the Burnt Pan.

    MASH:
    The attack minigame and the battle dialogue can be mashed, as neither are important to the fight. The opening and ending monologues aren't mashable though, so don't bother; just press Z.
    Do note that as battle dialogue, Some Dumbass' monologue can be mashed at 30 TBPS.

Safety Concerns:

See Also: My Guide to Undyne the Undying (Speedrunning Section)

Conclusion

And that concludes this overly long and comprehensive guide to defeating Sans Undertail.

I hope this guide helps with the fight, and that you learned something new about the complicated inner-workings of the battle mechanics.
Thanks for reading!