From 97496603de3c934ee456044ce1f25d942b9a3f85 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Tue, 14 Feb 2023 00:02:52 -0500 Subject: [PATCH] Dumped dungeon parameters --- Makefile | 4 +- asm/code_803D110.s | 6 +- asm/code_8041AD0.s | 2 +- asm/code_805D8C8.s | 2 +- data/data_8107010.s | 5 +- data/dungeon/.gitignore | 1 + data/dungeon/dungeon_data.json | 1668 +++++++++++++++++++++++++++++ data_dungeon.mk | 14 + dungeon_pokemon.mk | 2 +- include/dungeon.h | 8 +- src/dungeon.c | 12 +- src/dungeon_music.c | 2 +- tools/dungeonjson/dungeonjson.cpp | 30 +- 13 files changed, 1734 insertions(+), 22 deletions(-) create mode 100644 data/dungeon/dungeon_data.json create mode 100644 data_dungeon.mk diff --git a/Makefile b/Makefile index 8b86cc3e..73c96203 100755 --- a/Makefile +++ b/Makefile @@ -175,6 +175,7 @@ include dungeon_trap.mk include data_monster.mk include data_item.mk include data_move.mk +include data_dungeon.mk include graphics.mk $(TOOLDIRS): @@ -197,6 +198,7 @@ tidy: $(RM) -f $(MONSTER_DATA) $(RM) -f $(LEARNSET_DATA) $(RM) -f $(LEARNSET_PTRS) + $(RM) -f $(DUNGEON_DATA) $(RM) -f $(DUNGEON_FLOOR) $(RM) -f $(DUNGEON_POKEMON) $(RM) -f $(DUNGEON_TRAP) @@ -220,7 +222,7 @@ $(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c $(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.c @$(call scaninc,$(INCLUDE_PATHS)) -$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s dungeon_pokemon dungeon_floor dungeon_trap data_monster data_item data_move data_learnset data_learnset_ptrs +$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s dungeon_pokemon dungeon_floor dungeon_trap data_monster data_item data_move data_learnset data_learnset_ptrs data_dungeon @$(CPP) -x assembler-with-cpp $(CPPFLAGS) $< -o $(DATA_ASM_BUILDDIR)/$*.i.s @$(PREPROC) $(DATA_ASM_BUILDDIR)/$*.i.s charmap.txt > $(DATA_ASM_BUILDDIR)/$*.s $(AS) $(ASFLAGS) -o $@ $(DATA_ASM_BUILDDIR)/$*.s diff --git a/asm/code_803D110.s b/asm/code_803D110.s index 7b33604c..ef2f1ca6 100644 --- a/asm/code_803D110.s +++ b/asm/code_803D110.s @@ -1363,7 +1363,7 @@ _0803DAFE: ldr r1, _0803DBA8 adds r0, r1 ldrb r0, [r0] - bl GetStairDirection + bl IsStairDirectionUp lsls r0, 24 ldr r6, _0803DBB0 cmp r0, 0 @@ -2196,7 +2196,7 @@ _0803E1BC: ldr r1, _0803E1D8 adds r0, r4, r1 ldrb r0, [r0] - bl GetStairDirection + bl IsStairDirectionUp lsls r0, 24 movs r1, 0x16 cmp r0, 0 @@ -5603,7 +5603,7 @@ _0803FCB0: ldr r3, _0803FCF8 adds r0, r2, r3 ldrb r0, [r0] - bl GetStairDirection + bl IsStairDirectionUp lsls r0, 24 cmp r0, 0 beq _0803FCFC diff --git a/asm/code_8041AD0.s b/asm/code_8041AD0.s index 96a5ab9c..dbdd7a4b 100644 --- a/asm/code_8041AD0.s +++ b/asm/code_8041AD0.s @@ -546,7 +546,7 @@ _08042694: ldr r1, _080426C0 adds r0, r1 ldrb r0, [r0] - bl GetStairDirection + bl IsStairDirectionUp lsls r0, 24 ldr r4, _080426C4 cmp r0, 0 diff --git a/asm/code_805D8C8.s b/asm/code_805D8C8.s index c9ec9076..b80c103b 100644 --- a/asm/code_805D8C8.s +++ b/asm/code_805D8C8.s @@ -7423,7 +7423,7 @@ _080614C8: ldr r3, _08061578 adds r0, r1, r3 ldrb r0, [r0] - bl sub_8090158 + bl IsDungeonUnk8 lsls r0, 24 cmp r0, 0 beq _0806154C diff --git a/data/data_8107010.s b/data/data_8107010.s index 948b5f6b..31c75b11 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -541,9 +541,8 @@ gAvoidCaptureText: @ 8109CE4 gFinalScenarioText: @ 8109CF4 .incbin "baserom.gba", 0x109CF4, 0x3C - .global gDungeons -gDungeons: @ 8109D30 - .incbin "baserom.gba", 0x109D30, 0x620 + @ 8109D30 + #include "dungeon/dungeon_data.inc" .global gUnknown_810A350 gUnknown_810A350: @ 810A350 diff --git a/data/dungeon/.gitignore b/data/dungeon/.gitignore index 10086aa6..611ec510 100644 --- a/data/dungeon/.gitignore +++ b/data/dungeon/.gitignore @@ -1,3 +1,4 @@ **/pokemon_found.inc **/floor_id.inc trap_data.inc +dungeon_data.inc diff --git a/data/dungeon/dungeon_data.json b/data/dungeon/dungeon_data.json new file mode 100644 index 00000000..e41781c7 --- /dev/null +++ b/data/dungeon/dungeon_data.json @@ -0,0 +1,1668 @@ +[ + { + "name": "DUNGEON_TINY_WOODS", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_THUNDERWAVE_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_MT_STEEL", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_SINISTER_WOODS", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_SILENT_CHASM", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_MT_THUNDER", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MT_THUNDER_PEAK", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 800, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_GREAT_CANYON", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 70 + }, + { + "name": "DUNGEON_LAPIS_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_MT_BLAZE", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_MT_BLAZE_PEAK", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 800, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_FROSTY_FOREST", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FROSTY_GROTTO", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 800, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MT_FREEZE", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MT_FREEZE_PEAK", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 800, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MAGMA_CAVERN", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MAGMA_CAVERN_PIT", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 600, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_SKY_TOWER", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": true, + "forceGameSave": true, + "HMMask": 1, + "turnLimit": 2000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_SKY_TOWER_SUMMIT", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 600, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_STORMY_SEA", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 2, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_SILVER_TRENCH", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 18, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_METEOR_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": -1, + "maxItemsAllowed": 3, + "maxPartyMembers": 1, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_MT_FREEZE_PEAK_2", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 4, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 800, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WESTERN_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_BOSS_3", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_BOSS_4", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WISH_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 30, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": true, + "moneyResetTo0": false, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_BURIED_RELIC", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 40 + }, + { + "name": "DUNGEON_PITFALL_VALLEY", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 40 + }, + { + "name": "DUNGEON_NORTHERN_RANGE", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_BOSS_9", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_DESERT_REGION", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_SOUTHERN_CAVERN", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WYVERN_HILL", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FIERY_FIELD", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 80 + }, + { + "name": "DUNGEON_NORTHWIND_FIELD", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 80 + }, + { + "name": "DUNGEON_SOLAR_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_LIGHTNING_FIELD", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 80 + }, + { + "name": "DUNGEON_DARKNIGHT_RELIC", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WONDROUS_SEA", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MURKY_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_GRAND_SEA", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 2, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_UPROAR_FOREST", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_ODDITY_CAVE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_REMAINS_ISLAND", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MARVELOUS_SEA", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FANTASY_STRAIT", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_ROCK_PATH", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_SNOW_PATH", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 0 + }, + { + "name": "DUNGEON_AUTOPILOT", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_D50", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 100, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_D51", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_NORMAL_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 500, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_HOWLING_FOREST", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_D54", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_POISON_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WATERFALL_POND", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 4, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_UNKNOWN_RELIC", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_JOYOUS_TOWER", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": true, + "moneyResetTo0": false, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FAR_OFF_SEA", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 18, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_MT_FARAWAY", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 30, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": true, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 8, + "turnLimit": 2000, + "randomMovementChance": 100 + }, + { + "name": "DUNGEON_D61", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 10, + "maxItemsAllowed": 10, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_PURITY_FOREST", + "stairDirectionUp": true, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": 30, + "maxItemsAllowed": 0, + "maxPartyMembers": 1, + "levelResetTo1": true, + "moneyResetTo0": false, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 30 + }, + { + "name": "DUNGEON_OUT_ON_RESCUE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_JOIN_LOCATION_LEADER", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_JOIN_LOCATION_PARTNER", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_UNKNOWN_WORLD", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FROSTY_GROTTO_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_HOWLING_FOREST_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_POKEMON_SQUARE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_POKEMON_SQUARE_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_RESCUE_TEAM_BASE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_RESCUE_TEAM_BASE_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_AGB_SLOT", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_JOIN_LOCATION_CLIENT_POKEMON", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": true, + "rescuesAllowed": 10, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": false, + "HMMask": 0, + "turnLimit": 2000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_NORMAL_MAZE_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FIRE_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_WATER_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_GRASS_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_ELECTRIC_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_ICE_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FIGHTING_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_GROUND_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_FLYING_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_PSYCHIC_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_POISON_MAZE_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_BUG_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_ROCK_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_GHOST_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_DRAGON_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_DARK_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_STEEL_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_TEAM_SHIFTY", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_TEAM_CONSTRICTOR", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_TEAM_HYDRO", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_TEAM_RUMBLEROCK", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_RESCUE_TEAM_2", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + }, + { + "name": "DUNGEON_RESCUE_TEAM_MAZE", + "stairDirectionUp": false, + "leaderCanSwitch": false, + "recruitingEnabled": false, + "rescuesAllowed": -1, + "maxItemsAllowed": 20, + "maxPartyMembers": 3, + "levelResetTo1": false, + "moneyResetTo0": true, + "unk8": false, + "hasCheckpoint": false, + "forceGameSave": true, + "HMMask": 0, + "turnLimit": 1000, + "randomMovementChance": 50 + } +] diff --git a/data_dungeon.mk b/data_dungeon.mk new file mode 100644 index 00000000..65351ee7 --- /dev/null +++ b/data_dungeon.mk @@ -0,0 +1,14 @@ +# Dungeon data + +DUNGEON_DIR = $(DATA_ASM_SUBDIR)/dungeon +DUNGEON_DATA = $(DUNGEON_DIR)/dungeon_data.inc + +# Headers included by tools/dungeonjson/dungeonjson.cpp:generate_dungeon_data_text +DUNGEON_DATA_INC = \ + include/constants/dungeon.h \ + include/constants/move_id.h + +data_dungeon: $(DUNGEON_DATA); + +$(DUNGEON_DATA): $(DUNGEON_DIR)/dungeon_data.json $(DUNGEON_DATA_INC) + $(DUNGEONJSON) dungeon pmd-red $< diff --git a/dungeon_pokemon.mk b/dungeon_pokemon.mk index 3ca4d0f0..9a8492d9 100755 --- a/dungeon_pokemon.mk +++ b/dungeon_pokemon.mk @@ -8,4 +8,4 @@ DUNGEON_POKEMON := $(patsubst $(DUNGEONS_DIR)/%/,$(DUNGEONS_DIR)/%/pokemon_found dungeon_pokemon: $(DUNGEON_POKEMON); $(DUNGEONS_DIR)/%/pokemon_found.inc: $(DUNGEONS_DIR)/%/pokemon_found.json - $(DUNGEONJSON) dungeon pmd-red $< + $(DUNGEONJSON) dungeon_pokemon pmd-red $< diff --git a/include/dungeon.h b/include/dungeon.h index 606fe827..5bb21c95 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -11,7 +11,7 @@ struct DungeonName struct DungeonDataEntry { - /* 0x0 */ u8 stairDirection; + /* 0x0 */ bool8 stairDirectionUp; /* 0x1 */ bool8 leaderCanSwitch; /* 0x2 */ bool8 recruitingEnabled; /* 0x3 */ s8 rescuesAllowed; @@ -19,8 +19,8 @@ struct DungeonDataEntry /* 0x5 */ u8 maxPartyMembers; /* 0x6 */ bool8 levelResetTo1; /* 0x7 */ bool8 moneyResetTo0; - /* 0x8 */ u8 unk8; - /* 0x9 */ u8 unk9; + /* 0x8 */ bool8 unk8; + /* 0x9 */ bool8 hasCheckpoint; /* 0xA */ bool8 forceGameSave; // Whether to quicksave or not before entering. /* 0xB */ u8 HMMask; // HM mask for dungeon entry requirements (Fly, Dive, Waterfall, Surf, Water). /* 0xC */ s16 turnLimit; @@ -34,6 +34,6 @@ u32 sub_80908D8(struct DungeonLocation *dungeon); u8 sub_8090910(struct DungeonLocation *dungeon, u32 param_2); bool8 sub_809095C(u8 dungeon); s8 GetRescuesAllowed(u8 dungeon); -u8 GetUnk9(u8 dungeon); +bool8 HasCheckpoint(u8 dungeon); #endif //GUARD_DUNGEON_H diff --git a/src/dungeon.c b/src/dungeon.c index ce57e8cb..f99309c4 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -25,9 +25,9 @@ const u8 *GetDungeonName2(u8 dungeon) return gDungeonNames[dungeon].name2; } -u8 GetStairDirection(u8 dungeon) +bool8 IsStairDirectionUp(u8 dungeon) { - return gDungeons[dungeon].stairDirection; + return gDungeons[dungeon].stairDirectionUp; } s16 GetTurnLimit(u8 dungeon) @@ -40,9 +40,9 @@ bool8 IsForceGameSave(u8 dungeon) return gDungeons[dungeon].forceGameSave; } -u8 GetUnk9(u8 dungeon) +u8 HasCheckpoint(u8 dungeon) { - return gDungeons[dungeon].unk9; + return gDungeons[dungeon].hasCheckpoint; } bool8 IsLevelResetTo1(u8 dungeon) @@ -70,7 +70,7 @@ bool8 IsRecruitingEnabled(u8 dungeon) return gDungeons[dungeon].recruitingEnabled; } -u8 sub_8090158(u8 dungeon) +bool8 IsDungeonUnk8(u8 dungeon) { return gDungeons[dungeon].unk8; } @@ -111,7 +111,7 @@ void PrintYellowDungeonNametoBuffer(u8 *buffer, struct DungeonLocation *dungeonL void PrintDungeonLocationtoBuffer(u8 *buffer, struct DungeonLocation *dungeonLocation) { - if(gDungeons[dungeonLocation->id].stairDirection != 0){ + if(gDungeons[dungeonLocation->id].stairDirectionUp){ sprintfStatic(buffer, gUnknown_8108F18, gDungeonNames[dungeonLocation->id].name1, dungeonLocation->floor); //_F } else diff --git a/src/dungeon_music.c b/src/dungeon_music.c index a704fbf8..4a8e0381 100644 --- a/src/dungeon_music.c +++ b/src/dungeon_music.c @@ -131,7 +131,7 @@ bool8 sub_8083C88(u8 param_1) temp = &gDungeon->unk1CE98; - if (((GetUnk9(gDungeon->dungeonLocation.id) == 0) && + if ((!HasCheckpoint(gDungeon->dungeonLocation.id) && ((gDungeon->unk65C != 0) || (param_1 != 0))) || (temp->unk14 != 0x227)) { return TRUE; diff --git a/tools/dungeonjson/dungeonjson.cpp b/tools/dungeonjson/dungeonjson.cpp index 27e80e67..f44a901d 100644 --- a/tools/dungeonjson/dungeonjson.cpp +++ b/tools/dungeonjson/dungeonjson.cpp @@ -757,6 +757,32 @@ string generate_learnset_data_text(Json data) { return text.str(); } +string generate_dungeon_data_text(Json data) { + ostringstream text; + + text << "@ This is auto-generated by dungeon_data.json.\n"; + text << ".global gDungeons\n"; + text << "gDungeons:"; + for (Json data_entry : data.array_items()) { + text << read_json_bool(data_entry["stairDirectionUp"]) + << read_json_bool(data_entry["leaderCanSwitch"]) + << read_json_bool(data_entry["recruitingEnabled"]) + << read_json_int(data_entry["rescuesAllowed"], 1) + << read_json_int(data_entry["maxItemsAllowed"], 1) + << read_json_int(data_entry["maxPartyMembers"], 1) + << read_json_bool(data_entry["levelResetTo1"]) + << read_json_bool(data_entry["moneyResetTo0"]) + << read_json_bool(data_entry["unk8"]) + << read_json_bool(data_entry["hasCheckpoint"]) + << read_json_bool(data_entry["forceGameSave"]) + << read_json_int(data_entry["HMMask"], 1) + << read_json_int(data_entry["turnLimit"], 2) + << read_json_int(data_entry["randomMovementChance"], 2); + } + text << TABLE_END; + return text.str(); +} + string get_directory_name(string filename) { size_t dir_pos = filename.find_last_of("/\\"); @@ -1041,8 +1067,10 @@ int main(int argc, char *argv[]) { process_groups(filepath); } else if (mode == "layouts") { process_layouts(filepath); - } else if (mode == "dungeon") { + } else if (mode == "dungeon_pokemon") { process_json(filepath, "pokemon_found.inc", generate_pokemon_table_text); + } else if (mode == "dungeon") { + process_json(filepath, "dungeon_data.inc", generate_dungeon_data_text); } else if (mode == "floor") { process_json(filepath, "floor_id.inc", generate_floorID_table_text); } else if (mode == "monster") {