Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Undertale: the MTT Resort, up to the door of the CORE

Mason Chen482efda55cc9
diff --git a/README.md b/README.md
index fbfabac2..012ea84b 100644
--- a/README.md
+++ b/README.md
@@ -79,7 +79,7 @@ These are too big to fit next to NumPlay, so each one is its own app. Install it
<tr>
<td align="center"><a href="games/celeste/README.md"><img src="docs/media/thumb_celeste.png" width="200" alt="Celeste"><br><b>Celeste</b></a><br><sub>The whole climb, with every B-side and C-side</sub><br><a href="https://github.com/Mason363/NumPlay/releases/latest/download/Celeste.nwa">Download</a></td>
<td align="center"><a href="games/championisland/README.md"><img src="docs/media/thumb_championisland.png" width="200" alt="Champion Island"><br><b>Champion Island</b></a><br><sub>The whole island and its seven sports</sub><br><a href="https://github.com/Mason363/NumPlay/releases/latest/download/ChampionIsland.nwa">Download</a></td>
- <td align="center"><a href="games/undertale/README.md"><img src="docs/media/thumb_undertale.png" width="200" alt="Undertale"><br><b>Undertale</b></a><br><sub>The Ruins, Snowdin, Waterfall and Hotland, from the golden flowers to the MTT Resort's door</sub><br><a href="https://github.com/Mason363/NumPlay/releases/latest/download/Undertale.nwa">Download</a></td>
+ <td align="center"><a href="games/undertale/README.md"><img src="docs/media/thumb_undertale.png" width="200" alt="Undertale"><br><b>Undertale</b></a><br><sub>The Ruins, Snowdin, Waterfall, Hotland and the MTT Resort, from the golden flowers to the CORE's door</sub><br><a href="https://github.com/Mason363/NumPlay/releases/latest/download/Undertale.nwa">Download</a></td>
</tr>
<tr>
<td align="center"><a href="#roadmap"><b>More on the way</b></a><br><sub>The rest of Undertale, The Binding of Isaac, Plants vs. Zombies, Doom and more: see the roadmap</sub></td>
@@ -174,7 +174,7 @@ Filmed on my own calculator, no emulator.
- [x] The Final Earth 2
- [x] The Powder Toy (NumPowder)
- [x] Block Blast
-- [ ] Undertale: the Ruins, Snowdin, Waterfall and Hotland are out, the MTT Resort, the CORE and New Home are next
+- [ ] Undertale: the Ruins, Snowdin, Waterfall, Hotland and the MTT Resort are out, the CORE and New Home are next
- [ ] The Binding of Isaac
- [ ] Plants vs. Zombies
- [ ] Doom
diff --git a/docs/play.md b/docs/play.md
index 954a89ca..f2ca4c9b 100644
--- a/docs/play.md
+++ b/docs/play.md
@@ -268,7 +268,7 @@ Undertale comes as its own app, `Undertale.nwa`: it is too big to share the calc
| **toolbox**, **shift** or **var** | The menu: ITEM, STAT, CELL (C in the game) |
| **Home** | Keep the moment and quit |
-Name the fallen human, then walk and talk your way through the Ruins, Snowdin, Waterfall and Hotland. In a battle, FIGHT attacks (press **OK** when the bar crosses the middle), ACT checks a monster or does something to it, ITEM eats, and MERCY spares a monster that no longer wants to fight, or flees. Then move your SOUL to dodge; when it turns blue, it falls, and **Up** jumps; when it turns green, it stays put, and the arrows turn its shield to block. On ice you slide until something stops you. In Snowdin Town, walk into the shop to buy, and into the inn to rest. In Waterfall, walk into a bridge seed to push it into the water, where it blooms into a flower you can walk on; the bell calls the seeds back. A green bullet heals you. Walk up to a star and press **OK** to SAVE. Home keeps the moment you were at, and the next start is back there. Your save is also copied into `undertale_saves.py`, so installing the app again doesn't erase it. The Tem Shop in Temmie Village also buys what you carry. In Hotland, steam vents throw you over the lava, orange lasers hit you if you stand still and blue ones if you move, and in a shooting puzzle the arrows push the dark blocks and Z shoots. On the second floor, press the switches as the top conveyor belt carries you past them, and in Mettaton's news report, touch each bomb and defuse it while it's in the DEFUSE ZONE. When Muffet turns your SOUL purple, it keeps to three strings: **Up** and **Down** hop between them. In the tile puzzle, red tiles are walls, yellow ones shock you back, orange makes you smell of oranges (and blue water's piranhas bite then), and purple soap slides you on and smells of lemons. When your SOUL turns yellow, **OK** shoots. For now the game ends on the stairs up to the MTT Resort.
+Name the fallen human, then walk and talk your way through the Ruins, Snowdin, Waterfall, Hotland and the MTT Resort. In a battle, FIGHT attacks (press **OK** when the bar crosses the middle), ACT checks a monster or does something to it, ITEM eats, and MERCY spares a monster that no longer wants to fight, or flees. Then move your SOUL to dodge; when it turns blue, it falls, and **Up** jumps; when it turns green, it stays put, and the arrows turn its shield to block. On ice you slide until something stops you. In Snowdin Town, walk into the shop to buy, and into the inn to rest. In Waterfall, walk into a bridge seed to push it into the water, where it blooms into a flower you can walk on; the bell calls the seeds back. A green bullet heals you. Walk up to a star and press **OK** to SAVE. Home keeps the moment you were at, and the next start is back there. Your save is also copied into `undertale_saves.py`, so installing the app again doesn't erase it. The Tem Shop in Temmie Village also buys what you carry. In Hotland, steam vents throw you over the lava, orange lasers hit you if you stand still and blue ones if you move, and in a shooting puzzle the arrows push the dark blocks and Z shoots. On the second floor, press the switches as the top conveyor belt carries you past them, and in Mettaton's news report, touch each bomb and defuse it while it's in the DEFUSE ZONE. When Muffet turns your SOUL purple, it keeps to three strings: **Up** and **Down** hop between them. In the tile puzzle, red tiles are walls, yellow ones shock you back, orange makes you smell of oranges (and blue water's piranhas bite then), and purple soap slides you on and smells of lemons. When your SOUL turns yellow, **OK** shoots. At the MTT Resort, the desk rents you a room and the hotel's doors want room service. For now the game ends at the door of the CORE.
<br clear="right">
diff --git a/games/undertale/README.md b/games/undertale/README.md
index 2bae6095..1d1bd507 100644
--- a/games/undertale/README.md
+++ b/games/undertale/README.md
@@ -8,7 +8,7 @@
<p align="center">
<b>Fall into the Underground as a human child, on the NumWorks calculator.</b><br>
- The Ruins, Snowdin, Waterfall and all of Hotland, from the bed of golden flowers to the stairs up to the MTT Resort. The rest of the Underground is on the way.
+ The Ruins, Snowdin, Waterfall, all of Hotland and the MTT Resort, from the bed of golden flowers to the door of the CORE. The rest of the Underground is on the way.
</p>
<p align="center">
@@ -29,6 +29,7 @@
* **Hotland's first floor:** Alphys's Lab, where Mettaton bursts in with his quiz show, the conveyor belts, the Magma Chamber's steam vents and the burnt pan, the laser walkway, the two shooting puzzles that open the door, the vents over the lava and Mettaton's cooking show, with your phone's jetpack, up to the elevator. Alphys calls you as you go.
* **Hotland's second floor:** Sans's hot dog stand and Heats Flamesman, the invisible path to the Art Club's room, the Stained Apron, the conveyor belt puzzle and its three switches, the vent puzzle, the Bad Opinion Zone, the Royal Guards, and Mettaton's news report, where everything is a bomb and the clock is running.
* **Hotland's third floor:** the spiders' bake sale, the vent islands and their two shooting puzzles (the Diamond Boys, and Alphys asking you to watch anime), the conveyor belts past the laser drones, the spider entrance and Muffet's sticky lair, Mettaton's musical and the trapdoor to his tile puzzle against the clock, and the crossroads with the Nice Cream guy and Heats Flamesman, by the stairs up to the MTT Resort.
+* **The MTT Resort:** Sans out front, and dinner with him in the restaurant, where he tells you about the door in the forest; the lobby and its fountain, the MTT-Brand Burger Emporium with Burgerpants behind the counter, Bratty and Catty's shop up the alley, a night in the hotel, room service down the hall (and a dog behind door 4), and the door to the CORE.
* **Battles like in the game:** FIGHT with the timing bar, ACT, ITEM and MERCY, and your SOUL dodging each monster's own attacks in the box: Froggit, Whimsun, Moldsmal, Loox, Vegetoid, Migosp, Napstablook and Toriel in the Ruins; Snowdrake, Ice Cap, Gyftrot, Jerry, Chilldrake, Glyde, Doggo, Lesser Dog, Dogamy and Dogaressa, Greater Dog and Papyrus, whose blue attack makes your SOUL fall, in Snowdin; Aaron, Woshua, Moldbygg, Shyren, Temmie, Mad Dummy, who can't be hurt, and Undyne, who turns your SOUL green, in Waterfall; Vulkin, Tsunderplane, Pyrope and the Royal Guards in Hotland, the news report's bombs, defused in the DEFUSE ZONE, Muffet, whose purple SOUL keeps to her strings, and Mettaton, worn down by the yellow SOUL's shots.
* **Spare or fight:** every monster can be spared, and Flowey at the door remembers what you did. Lose to Papyrus and he only locks you in his shed.
* **Saved like in the game:** SAVE at the stars, with the room and the time played. The C menu has your ITEM, STAT and CELL. Home keeps the moment you were at, and your save is also copied into `undertale_saves.py`, so installing the app again doesn't erase it.
@@ -138,6 +139,10 @@
<td align="center"><img src="docs/yellow.png" width="390" alt="The yellow SOUL"><br><sub>The yellow button</sub></td>
<td align="center"><img src="docs/crossroads.png" width="390" alt="The crossroads"><br><sub>Nice Cream, by the MTT Resort</sub></td>
</tr>
+ <tr>
+ <td align="center"><img src="docs/dinner.png" width="390" alt="Dinner with Sans"><br><sub>Dinner with Sans at the MTT Resort</sub></td>
+ <td align="center"><img src="docs/alley.png" width="390" alt="Bratty and Catty's shop"><br><sub>Bratty and Catty's shop, up the alley</sub></td>
+ </tr>
</table>
## How to play
@@ -150,7 +155,7 @@ Snowdin brings new things: when Papyrus turns your SOUL blue, it falls to the bo
In Waterfall, walk into a bridge seed to push it: in the water it blooms into a flower you can walk on, and the bell calls the seeds back. A green bullet heals you instead of hurting. Talk to the piano to play it, and keep an umbrella for the rain. The Tem Shop is the one shop that buys what you carry. When Undyne turns your SOUL green, it can't move: turn its shield with the arrows to block her spears. She can't be spared: run, and she'll chase you.
-In Hotland, conveyor belts carry you and steam vents throw you over the lava (the one in the middle of the puzzle hub turns each time). Keep moving through orange lasers and stand still for blue ones. In a shooting puzzle, the arrows push every dark block one cell and Z shoots: break your way to the target in two shots. In Mettaton's quiz, move your SOUL onto an answer and press OK; Alphys signals the right one. Alphys's upgrade puts the Dimensional Box in your phone's CELL. On the second floor, the top conveyor belt carries you past three switches: press them one after another as you go by. In the vent puzzle, every panel you land on turns all the vents around, and the one at the top turns them back. To spare the Royal Guards, clean 02's armor, catch its green stars, then whisper to 01. In the news report, touch a bomb to face it, and Defuse it (or FIGHT it) while it's in the DEFUSE ZONE. On the third floor, ride the belt past the blue drones without a step. When Muffet turns your SOUL purple, it keeps to three strings: Up and Down hop between them, Left and Right move along. In the tile puzzle, red tiles are walls, yellow ones shock you back, orange ones make you smell of oranges (and the blue water's piranhas bite then), purple soap slides you on and makes you smell of lemons, and blue next to yellow is electrified. After it, ACT and press the yellow button: your SOUL turns yellow, and OK shoots.
+In Hotland, conveyor belts carry you and steam vents throw you over the lava (the one in the middle of the puzzle hub turns each time). Keep moving through orange lasers and stand still for blue ones. In a shooting puzzle, the arrows push every dark block one cell and Z shoots: break your way to the target in two shots. In Mettaton's quiz, move your SOUL onto an answer and press OK; Alphys signals the right one. Alphys's upgrade puts the Dimensional Box in your phone's CELL. On the second floor, the top conveyor belt carries you past three switches: press them one after another as you go by. In the vent puzzle, every panel you land on turns all the vents around, and the one at the top turns them back. To spare the Royal Guards, clean 02's armor, catch its green stars, then whisper to 01. In the news report, touch a bomb to face it, and Defuse it (or FIGHT it) while it's in the DEFUSE ZONE. On the third floor, ride the belt past the blue drones without a step. When Muffet turns your SOUL purple, it keeps to three strings: Up and Down hop between them, Left and Right move along. In the tile puzzle, red tiles are walls, yellow ones shock you back, orange ones make you smell of oranges (and the blue water's piranhas bite then), purple soap slides you on and makes you smell of lemons, and blue next to yellow is electrified. After it, ACT and press the yellow button: your SOUL turns yellow, and OK shoots. At the MTT Resort, the front desk rents you a room for the night, and the hotel's doors down the hall want room service: bring what they ask for.
Walk up to a star and press OK to SAVE and fill your HP. The C menu (toolbox) shows your items, your STAT and the phone numbers you have.
@@ -167,7 +172,7 @@ Walk up to a star and press OK to SAVE and fill your HP. The C menu (toolbox) sh
## Good to know
* **One app at a time:** Undertale is too big to sit next to NumPlay or the other big games. Installing it from the NumWorks website swaps them out, and installing them again swaps it out. Your saves in each one are kept.
-* **The Ruins, Snowdin, Waterfall and Hotland, for now:** the stairs up to the MTT Resort end the game, on a screen that says the rest of the Underground is still to come. The MTT Resort, the CORE and New Home come next, one at a time.
+* **The Ruins, Snowdin, Waterfall, Hotland and the MTT Resort, for now:** the door of the CORE ends the game, on a screen that says the rest of the Underground is still to come. The CORE and New Home come next, one at a time.
* **No music or sound:** the calculator has no speaker.
* **The same Underground:** the rooms and pictures are the game's, everyone says what they say in the game (the longer speeches in shorter words of our own), and the puzzles and battles follow how the game plays them, at its 30 frames a second.
diff --git a/games/undertale/docs/alley.png b/games/undertale/docs/alley.png
new file mode 100644
index 00000000..24382104
Binary files /dev/null and b/games/undertale/docs/alley.png differ
diff --git a/games/undertale/docs/dinner.png b/games/undertale/docs/dinner.png
new file mode 100644
index 00000000..51026c78
Binary files /dev/null and b/games/undertale/docs/dinner.png differ
diff --git a/games/undertale/src/data.bin b/games/undertale/src/data.bin
index b72db20c..7e7f61b6 100644
Binary files a/games/undertale/src/data.bin and b/games/undertale/src/data.bin differ
diff --git a/games/undertale/src/data.h b/games/undertale/src/data.h
index a1dd5217..14cfa729 100644
--- a/games/undertale/src/data.h
+++ b/games/undertale/src/data.h
@@ -204,116 +204,121 @@
#define SPR_TEMMIE_HURT 190
#define SPR_SHOP_GERSON 191
#define SPR_SHOP_TEM 192
-#define SPR_BIRD 193
-#define SPR_TUTU 194
-#define SPR_ARTIFACT 195
-#define SPR_ECHO_OW 196
-#define SPR_ALPHYS_OW 197
-#define SPR_MTT_OW 198
-#define SPR_MTT_B 199
-#define SPR_RGUARDS_OW 200
-#define SPR_VENT_D 201
-#define SPR_VENT_U 202
-#define SPR_VENT_L 203
-#define SPR_VENT_R 204
-#define SPR_BURNTPAN 205
-#define SPR_VULKIN_B 206
-#define SPR_VULKIN_HURT 207
-#define SPR_TSUNDER_B 208
-#define SPR_PYROPE_B 209
-#define SPR_PYROPE_HURT 210
-#define SPR_RG01_OW 211
-#define SPR_RG02_OW 212
-#define SPR_RG01_B 213
-#define SPR_RG02_B 214
-#define SPR_MTT_NEWS 215
-#define SPR_BOMB_BALL 216
-#define SPR_BOMB_DOG 217
-#define SPR_BOMB_PRESENT 218
-#define SPR_BOMB_WATER 219
-#define SPR_BOMB_SCRIPT 220
-#define SPR_BOMB_GAME 221
-#define SPR_NEWS_SCRIPT 222
-#define SPR_APRON 223
-#define SPR_MUFFET_OW 224
-#define SPR_MUFFET_B 225
-#define SPR_MUFFET_HURT 226
-#define SPR_MUFFET_PET 227
-#define SPR_SPIDER_B 228
-#define SPR_DIAMOND1 229
-#define SPR_DIAMOND2 230
-#define SPR_BOMB_B 231
-#define SPR_DOGBOMB_B 232
-#define SPR_WATER_B 233
-#define SPR_UNDYNE_FALLEN 234
-#define SPR_SPEAR 235
-#define SPR_ARROW 236
-#define SPR_PLANE 237
-#define SPR_BOMB 238
-#define SPR_CLOUD 239
-#define SPR_BOLT 240
-#define SPR_UNDYNE_B 241
-#define SPR_NOTE 242
-#define SPR_DROP 243
-#define SPR_ARM 244
-#define SPR_DEBRIS 245
-#define SPR_STAR 246
-#define SPR_CROISSANT 247
-#define SPR_DONUT 248
-#define SPR_MTTMINI 249
-#define SPR_AARON_B 250
-#define SPR_AARON_HURT 251
-#define SPR_WOSHUA_B 252
-#define SPR_WOSHUA_HURT 253
-#define SPR_MOLDBYGG_B 254
-#define SPR_SHYREN_B 255
-#define SPR_SHYREN_TURNED 256
-#define SPR_INTROIMAGE 257
-#define SPR_INTROLAST 258
-#define SPR_UNDERTALETITLE 259
-#define SPR_GAMEOVERBG 260
-#define SPR_FACE_TORIELTALK 261
-#define SPR_FACE_TORIELTALKSIDE 262
-#define SPR_FACE_TORIELHAPPYTALK 263
-#define SPR_FACE_TORIELWHAT 264
-#define SPR_FACE_TORIELWHATSIDE 265
-#define SPR_FACE_TORIELMAD 266
-#define SPR_FACE_TORIELCOLD 267
-#define SPR_FACE_TORIELSURPRISED 268
-#define SPR_FACE_TORIELEMBARRASSED 269
-#define SPR_FACE_TORIELGLASSES 270
-#define SPR_FACE_TORIELREVENGETALK 271
-#define SPR_FACE_TORIELSCARED 272
-#define SPR_FACE_TORIELBLINK 273
-#define SPR_FACE_TORIELHAPPYBLINK 274
-#define SPR_FACE_TORIELBODY 275
-#define SPR_FACE_SANS 276
-#define SPR_FACE_SANSCHUCKLE 277
-#define SPR_FACE_SANSWINK 278
-#define SPR_FACE_PAPYRUS 279
-#define SPR_FACE_PAPYRUSEVIL 280
-#define SPR_FACE_PAPYRUSLAUGH 281
-#define SPR_FACE_PAPYRUSMAD 282
-#define SPR_FACE_PAPYRUSSIDE 283
-#define SPR_FACE_ALPHYS 284
-#define SPR_FLOWEYNICE 285
-#define SPR_FLOWEYNICESIDE 286
-#define SPR_FLOWEYSASSY 287
-#define SPR_FLOWEYEVIL 288
-#define SPR_FLOWEYGRIN 289
-#define SPR_FLOWEYPLAIN 290
-#define SPR_FLOWEYPISSED 291
-#define SPR_FLOWEYWINK 292
-#define SPR_FLOWEYLAUGH 293
-#define SPR_FLOWEYHURT 294
-#define SPR_FLOWEYTORIEL 295
-#define SPR_FLOWEYTORIEL2 296
-#define SPR_FLOWEYSIDESHOCK 297
+#define SPR_SHOP_BURGER 193
+#define SPR_BURGERPANTS 194
+#define SPR_SHOP_BRATTY 195
+#define SPR_BRATTY_CATTY 196
+#define SPR_BIRD 197
+#define SPR_TUTU 198
+#define SPR_ARTIFACT 199
+#define SPR_ECHO_OW 200
+#define SPR_ALPHYS_OW 201
+#define SPR_MTT_OW 202
+#define SPR_MTT_B 203
+#define SPR_RGUARDS_OW 204
+#define SPR_VENT_D 205
+#define SPR_VENT_U 206
+#define SPR_VENT_L 207
+#define SPR_VENT_R 208
+#define SPR_BURNTPAN 209
+#define SPR_VULKIN_B 210
+#define SPR_VULKIN_HURT 211
+#define SPR_TSUNDER_B 212
+#define SPR_PYROPE_B 213
+#define SPR_PYROPE_HURT 214
+#define SPR_RG01_OW 215
+#define SPR_RG02_OW 216
+#define SPR_RG01_B 217
+#define SPR_RG02_B 218
+#define SPR_MTT_NEWS 219
+#define SPR_BOMB_BALL 220
+#define SPR_BOMB_DOG 221
+#define SPR_BOMB_PRESENT 222
+#define SPR_BOMB_WATER 223
+#define SPR_BOMB_SCRIPT 224
+#define SPR_BOMB_GAME 225
+#define SPR_NEWS_SCRIPT 226
+#define SPR_APRON 227
+#define SPR_MUFFET_OW 228
+#define SPR_MUFFET_B 229
+#define SPR_MUFFET_HURT 230
+#define SPR_MUFFET_PET 231
+#define SPR_SPIDER_B 232
+#define SPR_DIAMOND1 233
+#define SPR_DIAMOND2 234
+#define SPR_BOMB_B 235
+#define SPR_DOGBOMB_B 236
+#define SPR_WATER_B 237
+#define SPR_UNDYNE_FALLEN 238
+#define SPR_SPEAR 239
+#define SPR_ARROW 240
+#define SPR_PLANE 241
+#define SPR_BOMB 242
+#define SPR_CLOUD 243
+#define SPR_BOLT 244
+#define SPR_UNDYNE_B 245
+#define SPR_NOTE 246
+#define SPR_DROP 247
+#define SPR_ARM 248
+#define SPR_DEBRIS 249
+#define SPR_STAR 250
+#define SPR_CROISSANT 251
+#define SPR_DONUT 252
+#define SPR_MTTMINI 253
+#define SPR_AARON_B 254
+#define SPR_AARON_HURT 255
+#define SPR_WOSHUA_B 256
+#define SPR_WOSHUA_HURT 257
+#define SPR_MOLDBYGG_B 258
+#define SPR_SHYREN_B 259
+#define SPR_SHYREN_TURNED 260
+#define SPR_INTROIMAGE 261
+#define SPR_INTROLAST 262
+#define SPR_UNDERTALETITLE 263
+#define SPR_GAMEOVERBG 264
+#define SPR_FACE_TORIELTALK 265
+#define SPR_FACE_TORIELTALKSIDE 266
+#define SPR_FACE_TORIELHAPPYTALK 267
+#define SPR_FACE_TORIELWHAT 268
+#define SPR_FACE_TORIELWHATSIDE 269
+#define SPR_FACE_TORIELMAD 270
+#define SPR_FACE_TORIELCOLD 271
+#define SPR_FACE_TORIELSURPRISED 272
+#define SPR_FACE_TORIELEMBARRASSED 273
+#define SPR_FACE_TORIELGLASSES 274
+#define SPR_FACE_TORIELREVENGETALK 275
+#define SPR_FACE_TORIELSCARED 276
+#define SPR_FACE_TORIELBLINK 277
+#define SPR_FACE_TORIELHAPPYBLINK 278
+#define SPR_FACE_TORIELBODY 279
+#define SPR_FACE_SANS 280
+#define SPR_FACE_SANSCHUCKLE 281
+#define SPR_FACE_SANSWINK 282
+#define SPR_FACE_PAPYRUS 283
+#define SPR_FACE_PAPYRUSEVIL 284
+#define SPR_FACE_PAPYRUSLAUGH 285
+#define SPR_FACE_PAPYRUSMAD 286
+#define SPR_FACE_PAPYRUSSIDE 287
+#define SPR_FACE_ALPHYS 288
+#define SPR_FLOWEYNICE 289
+#define SPR_FLOWEYNICESIDE 290
+#define SPR_FLOWEYSASSY 291
+#define SPR_FLOWEYEVIL 292
+#define SPR_FLOWEYGRIN 293
+#define SPR_FLOWEYPLAIN 294
+#define SPR_FLOWEYPISSED 295
+#define SPR_FLOWEYWINK 296
+#define SPR_FLOWEYLAUGH 297
+#define SPR_FLOWEYHURT 298
+#define SPR_FLOWEYTORIEL 299
+#define SPR_FLOWEYTORIEL2 300
+#define SPR_FLOWEYSIDESHOCK 301
#define AREA_RUINS 0
#define AREA_SNOWDIN 1
#define AREA_SNOWTOWN 2
#define AREA_WATERFALL 3
#define AREA_HOTLAND 4
+#define AREA_RESORT 5
#define ROOM_AREA1 0
#define ROOM_AREA1_2 1
#define ROOM_RUINS1 2
@@ -474,10 +479,15 @@
#define ROOM_HT_STAGE 157
#define ROOM_HT_TILES 158
#define ROOM_HT_CROSS3 159
+#define ROOM_RES_OUTSIDE 160
+#define ROOM_RES_LOBBY 161
+#define ROOM_RES_DINER 162
+#define ROOM_RES_HALL 163
+#define ROOM_RES_ROOM 164
#define FONT_MAIN 0
#define FONT_MENU 1
#define FONT_SMALL 2
-#define NUM_SPRITES 298
-#define NUM_ROOMS 160
+#define NUM_SPRITES 302
+#define NUM_ROOMS 165
#define NUM_FONTS 3
#endif
diff --git a/games/undertale/src/events.c b/games/undertale/src/events.c
index 8b64b1f1..fc610da4 100644
--- a/games/undertale/src/events.c
+++ b/games/undertale/src/events.c
@@ -124,5 +124,7 @@ int event_run(Ev *c) {
if (r >= 0) return r;
r = ht3_event(c);
if (r >= 0) return r;
+ r = res_event(c);
+ if (r >= 0) return r;
return 1;
}
diff --git a/games/undertale/src/events.h b/games/undertale/src/events.h
index 4a6c39d4..521971a4 100644
--- a/games/undertale/src/events.h
+++ b/games/undertale/src/events.h
@@ -52,7 +52,9 @@ enum {
EV_HOTDOG, EV_HEATS, EV_APRON, EV_BELT_SWITCH, EV_HT2_CALL, EV_VENTPUZ, EV_GUARDS, EV_NEWS, EV_BOMB, EV_HT2_ELEVATOR,
/* ht3.c */
EV_BAKESALE3, EV_SHOOT3, EV_HT3_CALL, EV_MUFFET, EV_MUSICAL, EV_TILE, EV_TILES3, EV_HEATS3, EV_HT3_ELEVATOR,
- EV_NICECREAM3, EV_HT3_END,
+ EV_NICECREAM3,
+ /* resort.c */
+ EV_RES_SANS, EV_RES_SHOP, EV_RES_DOOR, EV_RES_DESK, EV_RES_CORE,
EV_COUNT
};
/* Toriel's calls on the way (EV_CALL's v[0]) */
diff --git a/games/undertale/src/flags.h b/games/undertale/src/flags.h
index 97569494..fd3f3c39 100644
--- a/games/undertale/src/flags.h
+++ b/games/undertale/src/flags.h
@@ -155,7 +155,13 @@ enum {
F_HT_MUSICAL, /* Mettaton's musical seen (and the trapdoor) */
F_HT_TILES3, /* the tile puzzle under the stage: 1 solved, 2 out of time; then Mettaton fought */
F_HT_HEATS3, /* Heats Flamesman asked about his name */
- F_HT_FLOOR3, /* the way to the MTT Resort reached (where the game now ends) */
+ F_HT_FLOOR3, /* the MTT Resort reached */
+ F_RES_SANS, /* dinner with Sans at the Resort */
+ F_RES_TEA, /* room service brought: the Sea Tea (door 1), the Cinnamon Bunny (door 3) */
+ F_RES_BUN,
+ F_RES_ROOM, /* the hotel's room: 1 paid for, 2 slept in */
+ F_RES_DOG, /* the Hot Dog slid under door 4 (for a Hush Puppy) */
+ F_RES_CORE, /* the CORE's door reached (where the game now ends) */
FLAG_COUNT = 256
};
#endif
diff --git a/games/undertale/src/game.c b/games/undertale/src/game.c
index cb0ac6a6..70883ae5 100644
--- a/games/undertale/src/game.c
+++ b/games/undertale/src/game.c
@@ -48,7 +48,7 @@ bool gain_exp(int exp) {
}
return up;
}
-int weapon_at(void) { return item_info(sv.weapon)->at; }
+int weapon_at(void) { return item_info(sv.weapon)->at + item_info(sv.armor)->at; } /* (the Cowboy Hat's too) */
int armor_df(void) { return item_info(sv.armor)->df; }
bool item_add(int item) {
diff --git a/games/undertale/src/hotland.h b/games/undertale/src/hotland.h
index 35707a70..f10d2af9 100644
--- a/games/undertale/src/hotland.h
+++ b/games/undertale/src/hotland.h
@@ -1,5 +1,5 @@
-/* Undertale: Hotland (ht1.c, ht2.c, ht3.c: its three floors), its monsters (htmon.c), Mettaton's shows
- * (htshows.c). */
+/* Undertale: Hotland (ht1.c, ht2.c, ht3.c: its three floors; resort.c: the MTT Resort), its monsters
+ * (htmon.c), Mettaton's shows (htshows.c). */
#ifndef UT_HOTLAND_H
#define UT_HOTLAND_H
#include "event.h"
@@ -18,4 +18,6 @@ void ht3_update(void); /* the webs' hold, the tile puzzle, its flames and clo
void ht3_draw(void); /* under everything: the flames, the turned-off force fields */
void ht3_draw_top(void); /* over everything: the tile puzzle's clock */
int ht3_speed(int x, int y);
+void res_setup(int room, int from);
+int res_event(Ev *c);
#endif
diff --git a/games/undertale/src/ht3.c b/games/undertale/src/ht3.c
index df3bb559..1a5fcfe0 100644
--- a/games/undertale/src/ht3.c
+++ b/games/undertale/src/ht3.c
@@ -1,7 +1,7 @@
/* Hotland, its third floor: out of the elevator, the spiders' bake sale; the vent islands, the shooting puzzles north
* (the Diamond Boys) and south (over the belts, past the drones); the spider entrance and Muffet's lair, its webs;
- * Mettaton's musical, the trapdoor down to the tile puzzle and his fight; the crossroads, where the way north leads to
- * the MTT Resort. (As the Undertale Wiki describes them; what they say is ours, in short.) */
+ * Mettaton's musical, the trapdoor down to the tile puzzle and his fight; the crossroads, where the stairs north lead
+ * to the MTT Resort (resort.c). (As the Undertale Wiki describes them; what they say is ours, in short.) */
#include <stddef.h>
#include <stdio.h>
#include "battle.h"
@@ -205,7 +205,6 @@ void ht3_setup(int room, int from) {
}
thing(8054, 430, 24, 30, EV_HEATS3, ACTOR_ITEM, 0);
thing(7934, 340, 80, 80, EV_HT3_ELEVATOR, ACTOR_DOOR, 0);
- obj_trigger(7522, 296, 56, 10, EV_HT3_END, ACTOR_TRIGGER);
break;
}
}
@@ -417,16 +416,6 @@ static int ev_elevator(Ev *c) {
EV_END;
}
-static int ev_end(Ev *c) {
- EV_BEGIN;
- NARRATE("* (The MTT Resort is just up\n these stairs.)");
- set_flag(F_HT_FLOOR3, 1);
- sv.room = (int16_t)g_room, sv.x = 7530, sv.y = 420;
- save_write_auto();
- menu_end_open();
- EV_END;
-}
-
int ht3_event(Ev *c) {
switch (c->id) {
case EV_BAKESALE3: return ev_bakesale(c);
@@ -439,7 +428,6 @@ int ht3_event(Ev *c) {
case EV_HEATS3: return ev_heats(c);
case EV_NICECREAM3: return ev_nicecream(c);
case EV_HT3_ELEVATOR: return ev_elevator(c);
- case EV_HT3_END: return ev_end(c);
}
return -1;
}
diff --git a/games/undertale/src/items.c b/games/undertale/src/items.c
index cecf88c5..9909283f 100644
--- a/games/undertale/src/items.c
+++ b/games/undertale/src/items.c
@@ -60,6 +60,21 @@ static const ItemInfo items[ITEM_COUNT] = {
"* You eat the Hot Dog.\n* (Bark!)", 10},
[ITEM_STAINED_APRON] = {"Stained Apron", "StainApro", IT_ARMOR, 0, 0, 11, "An apron with old stains.\n* Heals 1 HP every other turn.",
"", 50},
+ [ITEM_STARFAIT] = {"Starfait", "Starfait", IT_FOOD, 14, 0, 0, "A tall, sparkly dessert.\n* Very popular.",
+ "* You eat the Starfait.\n* It's sweet and fizzy.", 5},
+ [ITEM_GLAMBURGER] = {"Glamburger", "GlamBurg", IT_FOOD, 27, 0, 0, "A burger that glitters all\n over. Very popular.",
+ "* You eat the Glamburger.\n* It crunches. It's the glitter.", 15},
+ [ITEM_LEGENDARY_HERO] = {"Legendary Hero", "L. Hero", IT_FOOD, 40, 0, 0, "A sandwich shaped like a\n sword.",
+ "* You eat the Legendary Hero.\n* You feel brave!", 40},
+ [ITEM_STEAK] = {"Face Steak", "FaceSteak", IT_FOOD, 60, 0, 0, "A steak in the shape of\n Mettaton's face. Don't ask.",
+ "* You eat the steak.\n* ...It looks back at you.", 20},
+ [ITEM_JUNK_FOOD] = {"Junk Food", "JunkFood", IT_FOOD, 17, 0, 0, "Food someone threw away,\n probably.",
+ "* You eat the Junk Food.\n* Someone took a bite first.", 1},
+ [ITEM_EMPTY_GUN] = {"Empty Gun", "EmptyGun", IT_WEAPON, 0, 12, 0, "An old revolver with no\n bullets in it.", "", 100},
+ [ITEM_COWBOY_HAT] = {"Cowboy Hat", "CowboyHat", IT_ARMOR, 0, 5, 12, "A worn hat. Makes you want\n a beard. (+5 AT)", "", 50},
+ [ITEM_MYSTERY_KEY] = {"Mystery Key", "MystryKey", IT_SPECIAL, 0, 0, 0, "A key, too bent to go on\n your keychain.", "", 500},
+ [ITEM_HUSH_PUPPY] = {"Hush Puppy", "HushPupy", IT_FOOD, 65, 0, 0, "A spell that keeps a dog\n from casting magic.",
+ "* You eat the Hush Puppy.\n* Dog-magic is neutralized.", 150},
};
const ItemInfo *item_info(int id) { return &items[id >= 0 && id < ITEM_COUNT ? id : 0]; }
diff --git a/games/undertale/src/items.h b/games/undertale/src/items.h
index 9120436d..3c9a96e3 100644
--- a/games/undertale/src/items.h
+++ b/games/undertale/src/items.h
@@ -39,6 +39,16 @@ enum {
ITEM_INSTANT_NOODLES,
ITEM_HOT_DOG,
ITEM_STAINED_APRON,
+ /* the MTT Resort */
+ ITEM_STARFAIT,
+ ITEM_GLAMBURGER,
+ ITEM_LEGENDARY_HERO,
+ ITEM_STEAK,
+ ITEM_JUNK_FOOD,
+ ITEM_EMPTY_GUN,
+ ITEM_COWBOY_HAT,
+ ITEM_MYSTERY_KEY,
+ ITEM_HUSH_PUPPY,
ITEM_COUNT
};
enum { IT_FOOD, IT_WEAPON, IT_ARMOR, IT_SPECIAL };
diff --git a/games/undertale/src/menu.c b/games/undertale/src/menu.c
index d4668a4a..33e7d578 100644
--- a/games/undertale/src/menu.c
+++ b/games/undertale/src/menu.c
@@ -383,7 +383,7 @@ void menu_gameover_open(void) {
void menu_end_open(void) {
g_mode = MODE_END;
t = 0;
- writer_start(&w, "Up to the MTT Resort, past\nMuffet and the musical...|The rest of the underground\nis still to come...", 40, 90, FONT_MAIN);
+ writer_start(&w, "Up to the door of the CORE,\npast the MTT Resort...|The rest of the underground\nis still to come...", 40, 90, FONT_MAIN);
w.speed = 2;
}
diff --git a/games/undertale/src/resort.c b/games/undertale/src/resort.c
new file mode 100644
index 00000000..d4432141
--- /dev/null
+++ b/games/undertale/src/resort.c
@@ -0,0 +1,192 @@
+/* The MTT Resort: the street outside (Sans, and dinner with him in the restaurant), the lobby (its fountain, the
+ * MTT-Brand Burger Emporium, the elevator that's out of order, the door north to the CORE), the hotel's hallway and
+ * its room service. (As the Undertale Wiki describes them; what they say is ours, in short.) */
+#include <stddef.h>
+#include "event.h"
+#include "events.h"
+#include "game.h"
+#include "hotland.h"
+#include "items.h"
+#include "menu.h"
+#include "save.h"
+#include "shop.h"
+#include "snowdin.h"
+#include "world.h"
+
+static void gone(Obj *o) { o->kind = OBJ_NONE; }
+static Obj *thing(int x, int y, int w, int h, int event, int name, int arg) {
+ Obj *o = obj_trigger(x, y, w, h, event, name);
+ if (o) o->flags = OF_TALK | OF_SOLID, o->arg = (int16_t)arg;
+ return o;
+}
+static int slot_of(int item) {
+ for (int i = 0; i < NUM_ITEMS; i++)
+ if (sv.items[i] == item) return i;
+ return -1;
+}
+
+void res_setup(int room, int from) {
+ (void)from;
+ if (room < ROOM_RES_OUTSIDE || room > ROOM_RES_ROOM) return;
+ set_flag(F_HT_FLOOR3, 1);
+ switch (room) {
+ case ROOM_RES_OUTSIDE:
+ if (!flag(F_RES_SANS)) {
+ Obj *s = obj_sans(1143, 851, DIR_DOWN);
+ if (s) s->event = EV_RES_SANS, s->flags |= OF_TALK;
+ }
+ obj_sign(1260, 880, 18, 18, "* (A note: great deals up the\n creepy alley on the right!)");
+ thing(1382, 628, 36, 52, EV_RES_SHOP, ACTOR_DOOR, 1); /* Bratty and Catty's, up the alley */
+ break;
+ case ROOM_RES_LOBBY:
+ obj_save(1210, 448, "* (The calm of this hotel fills\n you with determination.)");
+ obj_sign(1180, 382, 80, 54, "* (Royal Memorial Fountain.\n Built 201X.)\n* (Mettaton added last week.)");
+ thing(1262, 226, 76, 54, EV_RES_SHOP, ACTOR_DOOR, 0); /* the MTT-Brand Burger Emporium */
+ obj_sign(1378, 228, 46, 52, "* (The elevator to the capital.)\n* (It's out of order.)");
+ thing(1100, 236, 80, 44, EV_RES_DESK, ACTOR_ITEM, 0);
+ obj_sign(1252, 496, 20, 24, "* Welcome to the MTT Resort!\n* Mettaton's own hotel!");
+ obj_sign(1354, 292, 36, 40, "* (On the phone: they won't be\n home tonight. The elevator.)");
+ obj_sign(1432, 284, 22, 34, "* Out of order?! The ONE\n elevator to the capital?!");
+ obj_sign(1394, 320, 52, 34, "* The elevator's broken, so\n we're trying to fit in all\n the guests going up.");
+ obj_sign(1290, 510, 22, 22, "* (A box. It's locked tight.)");
+ thing(1182, 84, 76, 56, EV_RES_CORE, ACTOR_DOOR, 0);
+ break;
+ case ROOM_RES_DINER:
+ obj_sign(820, 330, 60, 52, "* Welcome to the restaurant!|* ...you needed a reservation,\n darling. Sorry.");
+ obj_sign(640, 312, 30, 40, "* My son ran away after his\n mother fell down.|* ...I tell jokes here now.\n* Ice to meet you.");
+ obj_sign(622, 386, 18, 22, "* The CORE's made of parts\n you can swap around.|* So its layout changes when\n it needs to. Neat, huh?");
+ obj_sign(528, 376, 38, 44, "* Puzzles everywhere down here.\n* Ugh.|* They're from when we built\n them to stop humans.");
+ obj_sign(98, 440, 22, 30, "* (They forgot to book a table,\n so they're licking the ficus\n to look busy.)");
+ break;
+ case ROOM_RES_HALL:
+ for (int i = 0; i < 4; i++) thing(1652 + i * 75, 330, 36, 52, EV_RES_DOOR, ACTOR_ITEM, i + 1);
+ obj_sign(1930, 380, 44, 36, "* (They mop up the slime\n dripping off them.)\n* (It keeps dripping.)");
+ break;
+ case ROOM_RES_ROOM:
+ obj_sign(1680, 44, 120, 116, "* (A big, soft bed.)");
+ break;
+ }
+}
+
+/* ---------------------------------------------------------------- the events */
+static int ev_sans(Ev *c) {
+ Obj *s = obj_get(ACTOR_SANS);
+ EV_BEGIN;
+ if (flag(F_RES_SANS)) {
+ SAY(FACE_SANS, "* hey. good luck in there.");
+ return 1;
+ }
+ SAY(FACE_SANS, "* hey. you made it.|* how about dinner?\n* my treat.@Sure@Not now");
+ if (CHOICE() == 1) {
+ SAY(FACE_SANS, "* ok. i'll be around.");
+ return 1;
+ }
+ /* the restaurant: a table, and what he has to say */
+ FADE_TO(ROOM_RES_DINER, 236, 418, DIR_RIGHT);
+ s = obj_sans(338, 450, DIR_LEFT);
+ SAY(FACE_SANS, "* so. i keep watch in the\n forest by snowdin, right?|* out there's this big door.\n locked tight.|* so i'd knock and tell jokes\n through it. for fun.|* one day, somebody on the\n other side knocked back.|* an old lady. laughed at all\n of my jokes.|* we kept at it. day after\n day.");
+ SAY(FACE_SANS, "* then she asked me for a\n favor.|* if a human ever came out of\n that door...|* ...would i look after them?\n keep them safe?|* ...|* i don't like promises.\n but i made that one.|* and without it...|* well. you'd be dust by now,\n buddy.");
+ SAY(FACE_SANS, "* ...heh. lighten up.\n* thanks for dinner.|* wait. i said i'd pay, huh.\n* ...catch you later.");
+ set_flag(F_RES_SANS, 1);
+ s = obj_get(ACTOR_SANS);
+ WALK(s, s->x, 362, 2); /* up past the tables, out east */
+ s = obj_get(ACTOR_SANS);
+ WALK(s, 780, 362, 3);
+ gone(obj_get(ACTOR_SANS));
+ EV_END;
+}
+
+static int ev_shop(Ev *c) {
+ EV_BEGIN;
+ shop_open(c->self && c->self->arg ? SHOP_BRATTY : SHOP_BURGER);
+ WAIT_UNTIL(g_mode == MODE_WORLD);
+ EV_END;
+}
+
+/* the hotel's front desk: a room for 200G (door 2) */
+static int ev_desk(Ev *c) {
+ EV_BEGIN;
+ if (flag(F_RES_ROOM)) {
+ NARRATE(flag(F_RES_ROOM) == 1 ? "* Your room is the second\n door down the hall." : "* We hope you enjoyed your stay!");
+ return 1;
+ }
+ NARRATE("* Welcome to the MTT Resort!\n* A room is 200G a night.@Stay@Leave");
+ if (CHOICE() == 1) return 1;
+ if (sv.gold < 200) {
+ NARRATE("* ...you don't have enough\n money. Sorry!");
+ return 1;
+ }
+ sv.gold = (uint16_t)(sv.gold - 200);
+ set_flag(F_RES_ROOM, 1);
+ NARRATE("* Your room is the second\n door down the hall. Enjoy!");
+ EV_END;
+}
+
+/* the hotel's doors: room service for 1 and 3; 2 the room from the desk; a dog behind 4 */
+static int ev_door(Ev *c) {
+ EV_BEGIN;
+ c->v[0] = c->self ? c->self->arg : 1;
+ if (c->v[0] == 2) {
+ if (flag(F_RES_ROOM) != 1) {
+ NARRATE("* (The door is locked.)");
+ return 1;
+ }
+ world_fade_hold(ROOM_RES_ROOM, 1730, 158, DIR_DOWN, 90);
+ WAIT_UNTIL(!world_fading());
+ sv.hp = sv.maxhp;
+ set_flag(F_RES_ROOM, 2);
+ NARRATE("* (You slept soundly. Your HP\n was maxed out.)");
+ return 1;
+ }
+ if (c->v[0] == 4) {
+ if (flag(F_RES_DOG) || slot_of(ITEM_HOT_DOG) < 0) {
+ NARRATE("* (Something behind the door is\n panting.)\n* (It sounds like a dog.)");
+ return 1;
+ }
+ NARRATE("* (Something behind the door is\n panting.)|* (Slide a Hot Dog under it?)@Yes@No");
+ if (CHOICE() == 1) return 1;
+ item_remove_at(slot_of(ITEM_HOT_DOG));
+ item_add(ITEM_HUSH_PUPPY);
+ set_flag(F_RES_DOG, 1);
+ NARRATE("* (It tugs at the Hot Dog a few\n times, then gets it.)|* (A Hush Puppy slides back out.)");
+ return 1;
+ }
+ c->v[1] = c->v[0] == 1 ? ITEM_SEA_TEA : ITEM_CINNAMON_BUNNY;
+ c->v[2] = c->v[0] == 1 ? F_RES_TEA : F_RES_BUN;
+ if (flag(c->v[2])) {
+ NARRATE("* (Nobody's ordered anything\n else.)");
+ return 1;
+ }
+ NARRATE(c->v[0] == 1 ? "* (A note on the door: room\n service, please. A Sea Tea.)"
+ : "* (A note on the door: room\n service, please. A Cinnamon\n Bunny.)");
+ if (slot_of(c->v[1]) < 0) return 1;
+ NARRATE("* (Slide it under the door?)@Yes@No");
+ if (CHOICE() == 1) return 1;
+ item_remove_at(slot_of(c->v[1]));
+ sv.gold = (uint16_t)min_i(sv.gold + 99, 9999);
+ set_flag(c->v[2], 1);
+ NARRATE("* (Someone takes it, and slides\n 99G back under the door.)");
+ EV_END;
+}
+
+static int ev_core(Ev *c) {
+ EV_BEGIN;
+ NARRATE("* (The door to the CORE.)\n* (Go through?)@Yes@No");
+ if (CHOICE() == 1) return 1;
+ set_flag(F_RES_CORE, 1);
+ sv.room = (int16_t)g_room, sv.x = 1205, sv.y = 150;
+ save_write_auto();
+ menu_end_open();
+ EV_END;
+}
+
+int res_event(Ev *c) {
+ switch (c->id) {
+ case EV_RES_SANS: return ev_sans(c);
+ case EV_RES_SHOP: return ev_shop(c);
+ case EV_RES_DOOR: return ev_door(c);
+ case EV_RES_DESK: return ev_desk(c);
+ case EV_RES_CORE: return ev_core(c);
+ }
+ return -1;
+}
diff --git a/games/undertale/src/rooms.c b/games/undertale/src/rooms.c
index 980eab3b..d8f9c12c 100644
--- a/games/undertale/src/rooms.c
+++ b/games/undertale/src/rooms.c
@@ -24,6 +24,7 @@ void room_setup(int room, int from) {
ht1_setup(room, from);
ht2_setup(room, from);
ht3_setup(room, from);
+ res_setup(room, from);
}
/* each frame Frisk can walk: what a room watches (a rock on its switch, a cracked floor) */
diff --git a/games/undertale/src/shop.c b/games/undertale/src/shop.c
index c408dff4..8c71097c 100644
--- a/games/undertale/src/shop.c
+++ b/games/undertale/src/shop.c
@@ -12,10 +12,12 @@
typedef struct {
uint8_t item;
- uint8_t price;
+ uint16_t price;
} Ware;
typedef struct {
uint16_t pic;
+ uint16_t keeper; /* drawn over the picture (its feet at keeper_x, 120), 0 if the picture has them */
+ int16_t keeper_x;
const char *hello, *again, *buying, *bought, *poor, *full, *nobuy, *sell;
Ware wares[4];
int nwares;
@@ -59,6 +61,32 @@ static const Shop shops[SHOP_COUNT] = {
.answers = {"* hOI!!! i'm temmie!!", "* temmies r the best!!!\n* we love humans... but some temmies r allergic...",
"* temmie village is very old...\n* tem forget the rest.", "* tem wants to go to colleg someday!!"},
.ntopics = 4},
+ [SHOP_BURGER] = {
+ .pic = SPR_SHOP_BURGER, .keeper = SPR_BURGERPANTS, .keeper_x = 246,
+ .hello = "* Hi, welcome to MTT-Brand\n Burger Emporium...|* ...where the food is, uh...\n food.", .again = "* Anything else?",
+ .buying = "Take your\ntime. Please.", .bought = "Thanks...\nI guess.", .poor = "You don't\nhave the\nmoney.",
+ .full = "Your hands\nare full.", .nobuy = "Fine by me.",
+ .sell = "* Sell stuff? Here?\n* I can barely sell the burgers.",
+ .wares = {{ITEM_STARFAIT, 60}, {ITEM_GLAMBURGER, 120}, {ITEM_LEGENDARY_HERO, 300}, {ITEM_STEAK, 500}}, .nwares = 4,
+ .topics = {"Say hello", "About Mettaton", "About the food", "Your life"},
+ .answers = {"* Hi. I'm Burgerpants.\n* Not my real name. Long story.",
+ "* Mettaton's my boss.\n* He's... a lot.|* Everything here has to have\n his face on it.",
+ "* The Glamburger has glitter\n in it.|* Mettaton says that's how\n humans eat. Sure.",
+ "* I came here to be a star.\n* Now I make burgers.|* ...at least I've got my youth.\n* Right?"},
+ .ntopics = 4},
+ [SHOP_BRATTY] = {
+ .pic = SPR_SHOP_BRATTY, .keeper = SPR_BRATTY_CATTY, .keeper_x = 160,
+ .hello = "* Hey! Check it out!\n* Yeah! Check it out!", .again = "* Like, anything else?",
+ .buying = "Buy ALL\nour stuff!", .bought = "Thanks!\nLike, so\nmuch!", .poor = "You need\nWAY more\nmoney.",
+ .full = "You have\nTOO many\nitems!", .nobuy = "Whatever!",
+ .sell = "* We don't, like, need\n anything. Really.",
+ .wares = {{ITEM_JUNK_FOOD, 25}, {ITEM_EMPTY_GUN, 350}, {ITEM_COWBOY_HAT, 350}, {ITEM_MYSTERY_KEY, 600}}, .nwares = 4,
+ .topics = {"About you two", "Burgerpants", "Your stuff", "Mettaton"},
+ .answers = {"* I'm Bratty. She's Catty.\n* We're, like, best friends.",
+ "* The guy at the burger place?\n* Ugh, a creep.|* ...a kind of cute creep,\n though. -Catty",
+ "* We find it all in the dump.\n* It's GOOD garbage.|* And, like, TOTALLY expensive.",
+ "* Mettaton is SO cute.\n* We're, like, his biggest fans."},
+ .ntopics = 4},
};
static int shop_id, st, sel, sub;
@@ -245,6 +273,7 @@ void shop_draw(void) {
const Shop *s = &shops[shop_id];
gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, 255);
gfx_sprite(s->pic, 0, 0, 0, 0, 255);
+ if (s->keeper) gfx_sprite(s->keeper, 0, s->keeper_x, 120, 0, 255);
panel(2, 121, 210, 117);
panel(212, 121, 106, 117);
char g[24];
diff --git a/games/undertale/src/shop.h b/games/undertale/src/shop.h
index f803103b..8581069f 100644
--- a/games/undertale/src/shop.h
+++ b/games/undertale/src/shop.h
@@ -2,7 +2,7 @@
#ifndef UT_SHOP_H
#define UT_SHOP_H
#include <stdint.h>
-enum { SHOP_SNOWDIN, SHOP_GERSON, SHOP_TEM, SHOP_COUNT };
+enum { SHOP_SNOWDIN, SHOP_GERSON, SHOP_TEM, SHOP_BURGER, SHOP_BRATTY, SHOP_COUNT };
void shop_open(int id); /* MODE_SHOP until Exit */
void box_open(void);
void shop_update(uint32_t keys, uint32_t pressed);
diff --git a/games/undertale/tests/check.py b/games/undertale/tests/check.py
index 06340696..cccd6655 100644
--- a/games/undertale/tests/check.py
+++ b/games/undertale/tests/check.py
@@ -38,6 +38,7 @@ FORM_SNOWDRAKE, FORM_PAPYRUS = 19, 31
ITEM_OLD_TUTU, ITEM_BALLET_SHOES, ITEM_QUICHE, ITEM_PUNCH_CARD, ITEM_ARTIFACT, ITEM_ASTRONAUT_FOOD = range(17, 23)
ITEM_BURNT_PAN, ITEM_INSTANT_NOODLES, ITEM_HOT_DOG, ITEM_STAINED_APRON = 28, 29, 30, 31
ITEM_NICE_CREAM = 13
+ITEM_STARFAIT = 32
def run(args, frames, saves=None, what=""):
@@ -261,12 +262,12 @@ if not QUICK:
# Hotland's third floor: the bake sale, the vent islands, both shooting puzzles (the Diamond Boys, Alphys's anime),
# the belts past the drones, Muffet spared, Mettaton's musical, the tile puzzle and his fight, the crossroads (a Nice
-# Cream, Heats Flamesman), up to the MTT Resort
+# Cream, Heats Flamesman), up the stairs to the MTT Resort
if not QUICK:
s = run(["--name", "Frisk", "--noenc", "--god", "--gold", "100", "--room", str(ROOMS["HT_L3"]), "--at", "3770,842",
"--path-file", os.path.join(HERE, "hotland3.path")], 14000, what="Hotland's third floor")
- check(s and s["mode"] == MODE_END and s["room"] == ROOMS["HT_CROSS3"],
- f"Hotland's third floor did not end by the MTT Resort: {s}")
+ check(s and s["mode"] == MODE_WORLD and s["room"] == ROOMS["RES_OUTSIDE"],
+ f"Hotland's third floor did not end at the MTT Resort: {s}")
if s:
for name, v in (("HT_CALL_HUB3", 1), ("HT3_PUZ_N", 1), ("HT3_PUZ_S", 1), ("HT_ANIME", 1), ("HT_MUFFET", 1),
("HT_MUSICAL", 1), ("HT_TILES3", 1), ("HT_HEATS3", 1), ("HT_FLOOR3", 1)):
@@ -275,6 +276,18 @@ if not QUICK:
check(s["gold"] == 188, f"Hotland's third floor: Muffet's gold or the Nice Cream went wrong: {s['gold']}")
check(ITEM_NICE_CREAM in s["items"], f"Hotland's third floor: no Nice Cream: {s['items']}")
+# the MTT Resort: dinner with Sans, a Starfait from Burgerpants, a night in the hotel (200G), room service and the
+# dog's door (nothing to give), up to the CORE's door
+if not QUICK:
+ s = run(["--name", "Frisk", "--noenc", "--god", "--gold", "400", "--room", str(ROOMS["HT_CROSS3"]), "--at", "7550,420",
+ "--path-file", os.path.join(HERE, "resort.path")], 5000, what="the MTT Resort")
+ check(s and s["mode"] == MODE_END and s["room"] == ROOMS["RES_LOBBY"], f"the MTT Resort did not end at the CORE: {s}")
+ if s:
+ for name, v in (("HT_FLOOR3", 1), ("RES_SANS", 1), ("RES_ROOM", 2), ("RES_CORE", 1), ("RES_TEA", 0), ("RES_DOG", 0)):
+ check(flag(s, name) == v, f"the MTT Resort: F_{name} is {flag(s, name)}, not {v}")
+ check(s["gold"] == 140, f"the MTT Resort: the Starfait or the room went wrong: {s['gold']}")
+ check(ITEM_STARFAIT in s["items"], f"the MTT Resort: no Starfait: {s['items']}")
+
if failures:
print("\n".join("FAIL " + f for f in failures))
sys.exit(1)
diff --git a/games/undertale/tests/resort.path b/games/undertale/tests/resort.path
new file mode 100644
index 00000000..3dd02a82
--- /dev/null
+++ b/games/undertale/tests/resort.path
@@ -0,0 +1,64 @@
+# the MTT Resort, up the crossroads' stairs (play it with --room 159 --at 7550,420 --name Frisk --noenc --god
+# --gold 400): Sans out front, dinner with him; the lobby, a Starfait from Burgerpants; a room at the desk, door 2
+# and its bed; doors 1 and 4 (nothing to give); the CORE's door
+w5
+7550,410
+7550,276
+w30
+go:1152,829
+l
+z
+talk
+pick:0
+talk
+w30
+go:1030,400
+1075,400
+w10
+go:1290,262
+u
+z
+w40
+z
+w5
+z
+w5
+z
+w30
+x
+w5
+u
+z
+w20
+go:1140,262
+u
+z
+pick:0
+talk
+go:1450,396
+1490,396
+w10
+go:1735,362
+u
+z
+talk
+w30
+go:1730,200
+1730,214
+w10
+go:1660,362
+u
+z
+talk
+go:1885,362
+u
+z
+talk
+go:1500,396
+1470,396
+w10
+go:1210,122
+u
+z
+pick:0
+w60
diff --git a/games/undertale/tools/rooms.py b/games/undertale/tools/rooms.py
index 3baa84f4..24ebbfc8 100644
--- a/games/undertale/tools/rooms.py
+++ b/games/undertale/tools/rooms.py
@@ -161,6 +161,10 @@ HT3_ISLES = [(4720, 700), (4800, 700), (4880, 700), (4640, 780), (4720, 780), (4
HT3_GRATES = [(4600, 880), (4820, 660), (4820, 1100), (5040, 880)]
HT_STAGE = [(163, 73, 164), (132, 53, 125), (55, 44, 103)]
HT_TILES = [(64, 64, 255), (255, 255, 128), (255, 192, 192), (156, 255, 121), (255, 193, 74), (192, 0, 192)]
+# the MTT Resort: its lobby's checkered floor and red carpet; the street's paving and carpet; the restaurant's floor
+RES_FLOOR = [(251, 205, 121), (251, 225, 121), (235, 105, 99), (203, 67, 33), (253, 241, 193)]
+RES_STREET = [(36, 43, 57), (71, 68, 130), (44, 41, 80), (207, 52, 52), (138, 55, 86), (235, 105, 99)]
+RES_DINER = [(114, 73, 95), (90, 83, 119), (90, 74, 132)]
# the vent puzzle's platforms (their top-left)
HT_VENTPUZ = [(4620, 2160), (4520, 2260), (4620, 2260), (4720, 2260), (4520, 2360), (4620, 2360), (4520, 2460),
(4620, 2460)]
@@ -190,6 +194,9 @@ AREAS.append(dict(name="hotland", map="Hotland_map.png", floor=HT_FLOOR, margin=
("erase", 536, 6208, 42, 11, [(19, 35, 45), (18, 34, 44), (19, 35, 44), (23, 37, 53), (20, 37, 47), (20, 36, 46)]),
]))
+AREAS.append(dict(name="resort", map="MTT_Resort_map.png", floor=RES_FLOOR, margin=0, close=True,
+ patches=[("copy", 1289, 818, 26, 36, 1131, 818)])) # Sans out front (a sprite here)
+
ROOMS = [
# the landing: the bed of golden flowers, a hallway, the Delta Rune arch
dict(name="area1", area="ruins", rect=(0, 5900, 680, 260), title="Ruins", margin=0,
@@ -590,7 +597,29 @@ ROOMS = [
dict(name="ht_tiles", area="hotland", rect=(6340, 540, 1280, 260), title="Hotland",
floor_colors=HT_FLOOR + HT_BELT + HT_HUB + HT_TILES, fix=[("walk", 7522, 540, 56, 84)]),
dict(name="ht_cross3", area="hotland", rect=(7320, 280, 820, 260), title="Hotland",
- fix=[("walk", 7522, 290, 56, 124), ("walk", 7522, 470, 56, 70)]),
+ fix=[("walk", 7522, 290, 56, 124), ("walk", 7522, 470, 56, 70)],
+ doors=[((7522, 292, 56, 10), "res_outside", (1210, 976), "up")]),
+ # the MTT Resort (its own map): the street outside (Sans by the door), the lobby (the fountain, the Burger
+ # Emporium, the elevator, the CORE's door north), the restaurant west, the hotel's hallway east
+ dict(name="res_outside", area="resort", rect=(960, 610, 520, 410), title="MTT Resort", floor_colors=RES_STREET,
+ # (the building is drawn in the street's colours: the plaza, the door's carpet, the alley up the right)
+ floor_rects=[(990, 842, 470, 158), (1190, 1000, 70, 20), (1188, 826, 64, 20), (1384, 648, 34, 200)],
+ fix=[("wall", 1084, 932, 112, 22), ("wall", 1244, 932, 112, 22)], # the velvet ropes
+ doors=[((1190, 832, 60, 6), "res_lobby", (1205, 568), "up"), ((1197, 1012, 56, 8), "ht_cross3", (7536, 300), "down")]),
+ dict(name="res_lobby", area="resort", rect=(1060, 60, 420, 550), title="MTT Resort",
+ floor_rects=[(1080, 278, 380, 162), (1080, 440, 280, 98), (1060, 380, 20, 60), (1460, 380, 20, 60),
+ (1200, 136, 40, 142), (1200, 538, 40, 72)],
+ doors=[((1195, 600, 50, 6), "res_outside", (1205, 840), "down"), ((1060, 380, 6, 60), "res_diner", (1030, 396), "left"),
+ ((1474, 380, 6, 60), "res_hall", (1488, 396), "right")]),
+ dict(name="res_diner", area="resort", rect=(60, 220, 1000, 300), title="MTT Resort", floor_colors=RES_DINER + RES_FLOOR,
+ floor_rects=[(82, 342, 698, 156), (780, 382, 280, 56)],
+ doors=[((1054, 380, 6, 60), "res_lobby", (1068, 396), "right")]),
+ dict(name="res_hall", area="resort", rect=(1480, 300, 540, 160), title="MTT Resort", floor_rects=[(1480, 380, 520, 60)],
+ doors=[((1480, 380, 6, 60), "res_lobby", (1450, 396), "left")]),
+ # the hotel's room (door 2), reached from the hall by its door
+ dict(name="res_room", area="resort", rect=(1640, 0, 200, 250), title="MTT Resort",
+ floor_rects=[(1644, 84, 192, 116), (1720, 200, 40, 50)],
+ doors=[((1720, 232, 40, 8), "res_hall", (1735, 364), "down")]),
]
# rooms one above the other through a dark doorway (tools/pack.py: apply_links); ("h", left, right, y, h): side
diff --git a/games/undertale/tools/sprites.py b/games/undertale/tools/sprites.py
index 3a9ce557..c5b1fc90 100644
--- a/games/undertale/tools/sprites.py
+++ b/games/undertale/tools/sprites.py
@@ -399,6 +399,12 @@ SPRITES = [
("temmie_hurt", "wiki:Temmie_battle_hurt.png", {"feet": True}),
("shop_gerson", "wiki:Gerson_screenshot_shop.png", {"keep": True, "box": (0, 0, 320, 120)}),
("shop_tem", "wiki:Tem_Shop_screenshot_Temmie_Armor.png", {"keep": True, "box": (0, 0, 320, 120)}),
+ # the MTT-Brand Burger Emporium: its counter, Burgerpants behind it
+ ("shop_burger", "wiki:Burgerpants_sprite_shop.png", {"keep": True, "box": (0, 0, 320, 120)}),
+ ("burgerpants", "wiki:Burgerpants_face_1.png", {"feet": True}),
+ # Bratty and Catty's alley: its trash cans and door, the two of them in front
+ ("shop_bratty", "wiki:Bratty_and_Catty_sprite_shop.png", {"keep": True, "box": (0, 0, 320, 120)}),
+ ("bratty_catty", "wiki:Bratty_and_Catty_sprite.png", {"feet": True}),
("bird", "map:Waterfall_map.png:8466,578,15,19", {"keep": True, "clear": [(27, 33, 90), (27, 21, 72), (23, 13, 43)]}),
("tutu", "map:Waterfall_map.png:1240,1240,22,10", {"keep": True, "clear": [(23, 13, 43), (27, 21, 72), (27, 33, 90)]}),
("artifact", "map:Waterfall_map.png:10156,150,12,11",