The Sanity doppelganger (the code calls it a "SanMonster" or "Nightmare") is an enemy copy of one of your own heroes that hunts you while you are in the Lunatic state. Defeating it cancels the state in the open world without a trip to an altar (Lunatic state#Ways out).
When it appears#
It is created by the sanity update once all of these hold:
- the host hero is Lunatic and not already about to die;
- the area is the open world: not a boss room, not the maze, not the Lost Valley and not the Colossal Grave (story 8);
- no doppelganger exists yet.
If you have several heroes in the team, the game picks one of them at random (the code only picks from your own heroes; the nine "SanMonster"-flagged enemy rows in the data are never reached and are dead data). The copy takes that hero's level and name.
It spawns at one of the preset spawn points of the map that is 2 to 30 metres from you by walking path, has a clear line of travel to you, and has the lowest score of distance x (angle from your camera direction / 180). In practice it appears close to the middle of your view rather than behind you, and the spawn point is re-evaluated about once per second while it is searching.
Stats#
Applied on top of the hero's normal level-based stats:
| Stat | Multiplier |
|---|---|
| Health | x0.5 (rounded up) |
| Physical damage | x2.0 |
| Weakness (stagger) gauge | x0.005, rounded up (so a few points) |
| Weakness recovery | x0.0004, rounded up |
| Toughness | overridden to -14 |
The tiny stagger gauge and negative toughness mean even a single heavy hit can stagger it, while its damage is double yours. Because it is a hero, it uses the hero's own move set; it can also drink your Health Potions (see below, inferred from the item code).
Potions#
Any item the copy uses is taken from your own bag. The game counts how many Health Potions it drinks. When you kill it, that many potions drop on its corpse. If you kill it quickly you lose nothing; if you let it heal itself repeatedly you only get back what it actually used.
Rewards#
Killing it:
- removes the crazy lock and refills your sanity to the maximum;
- resets the potion counter;
- rolls the nightmare drop table 99999 (Drops and loot): a 60% chance of nothing and a 40% chance of Anthozoan Bones, exactly 2 in the first loop and exactly 3 in loops 2 to 4 (identical rows for stories 1 to 7 and 9; the Colossal Grave has none);
- victory over a boss, your own death and the other recovery events make a living doppelganger fade away without a drop.
Hidden mechanics#
- It is always your own hero. The branch that would spawn a story enemy instead is unreachable, because the index is always clamped to the number of heroes you own.
- It never appears in boss rooms. There the Lunatic state is handled by promoting the boss to its second phase instead.
- Several unlocked heroes randomise it. The copy can be any hero in your party, not necessarily the one you are playing.
- It is a glass cannon. Half health, double damage and almost no stagger gauge.
Related#
Lunatic state, Sanity, Enemies, Characters, Consumables.
Sources#
- Spawn:
controller/controllerstorymode.lua:2263-2272(UpdateSan branch),:3079-3190(CreateSanMonster),:2330-2400(GetSanBornPosition),:20-28(distance and expiry constants),gamedata/scenedefine.lua:76(path max 30). - Stats:
gamedata/playerdefine/animalbase_define.lua:228-232,logic/playervalue/animalbase_value.lua:185-197(InitPropertyBase),gamedata/playerdefine/animalbase_value_define.lua:21(Toughness -14). - Death:
controller/controllerstorymode.lua:1896-1902(SanMonsterDead),:3453-3458,:5305-5329(CreateNightmareDropItem),:5346-5353(potion counter),logic/player/animalbase.lua:6572-6590,:11103-11110. - Disappear:
controller/controllerstorymode.lua:3265-3283,:2428-2444. - Drop table: ItemDropData rows with
DropId99999 (16 rows, two per story 1 to 7 and 9):Prob_k60 (ItemId_k0) and 40 (ItemId_k40011);Num1_k=Num2_k= 2 for loop 1 (k = 1) and 3 for k = 2 to 4. Column k is chosen by the loop:structdata/ms_storyitemdrop.lua:34-45(SetLoop), roll atcontroller/controllerstorymode.lua:5356-5400(GetStoryDropItem). - Dead data: table StoryMonster rows with
SanMonster= 1 (StoryId 2 / 2023, 99 / 99001-99007, 1001 / 1001054).