diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm index 27644af1f..8a810ecb0 100644 --- a/constants/engine_flags.asm +++ b/constants/engine_flags.asm @@ -177,6 +177,22 @@ const ENGINE_DAILY_MOUNT_MOON_B2F_MUSHROOM const ENGINE_DAILY_ROUTE_13_BERRY const ENGINE_DAILY_SILVER_CAVE_OUTSIDE_BERRY + const ENGINE_DAILY_FALKNER_REMATCH + const ENGINE_DAILY_BUGSY_REMATCH + const ENGINE_DAILY_WHITNEY_REMATCH + const ENGINE_DAILY_MORTY_REMATCH + const ENGINE_DAILY_CHUCK_REMATCH + const ENGINE_DAILY_JASMINE_REMATCH + const ENGINE_DAILY_PRYCE_REMATCH + const ENGINE_DAILY_CLAIR_REMATCH + const ENGINE_DAILY_BROCK_REMATCH + const ENGINE_DAILY_MISTY_REMATCH + const ENGINE_DAILY_LTSURGE_REMATCH + const ENGINE_DAILY_ERIKA_REMATCH + const ENGINE_DAILY_JANINE_REMATCH + const ENGINE_DAILY_SABRINA_REMATCH + const ENGINE_DAILY_BLAINE_REMATCH + const ENGINE_DAILY_BLUE_REMATCH ; wDailyFlags2 const ENGINE_MT_MOON_SQUARE_CLEFAIRY const ENGINE_UNION_CAVE_LAPRAS diff --git a/constants/event_flags.asm b/constants/event_flags.asm index f31207cb4..dffe309f2 100644 --- a/constants/event_flags.asm +++ b/constants/event_flags.asm @@ -1740,22 +1740,6 @@ const EVENT_VERMILION_GYM_SWITCH_1 const EVENT_VERMILION_GYM_SWITCH_2 const EVENT_BEAT_RED - const EVENT_BEAT_FALKNER_REMATCH - const EVENT_BEAT_BUGSY_REMATCH - const EVENT_BEAT_WHITNEY_REMATCH - const EVENT_BEAT_MORTY_REMATCH - const EVENT_BEAT_CHUCK_REMATCH - const EVENT_BEAT_JASMINE_REMATCH - const EVENT_BEAT_PRYCE_REMATCH - const EVENT_BEAT_CLAIR_REMATCH - const EVENT_BEAT_BROCK_REMATCH - const EVENT_BEAT_MISTY_REMATCH - const EVENT_BEAT_LT_SURGE_REMATCH - const EVENT_BEAT_ERIKA_REMATCH - const EVENT_BEAT_JANINE_REMATCH - const EVENT_BEAT_SABRINA_REMATCH - const EVENT_BEAT_BLAINE_REMATCH - const EVENT_BEAT_BLUE_REMATCH ; Unused: next 25 events const_next 2048 diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index c4f415ee2..62ca10460 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -354,6 +354,22 @@ DEF CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2 const DAILYFLAGS_MOUNT_MOON_B2F_MUSHROOM ; 67 const DAILYFLAGS_ROUTE13_BERRY ; 68 const DAILYFLAGS_SILVER_CAVE_OUTSIDE_BERRY ; 69 + const DAILYFLAGS_FALKNER_REMATCH ; 70 + const DAILYFLAGS_BUGSY_REMATCH ; 71 + const DAILYFLAGS_WHITNEY_REMATCH ; 72 + const DAILYFLAGS_MORTY_REMATCH ; 73 + const DAILYFLAGS_CHUCK_REMATCH ; 74 + const DAILYFLAGS_JASMINE_REMATCH ; 75 + const DAILYFLAGS_PRYCE_REMATCH ; 76 + const DAILYFLAGS_CLAIR_REMATCH ; 77 + const DAILYFLAGS_BROCK_REMATCH ; 78 + const DAILYFLAGS_MISTY_REMATCH ; 79 + const DAILYFLAGS_LTSURGE_REMATCH ; 80 + const DAILYFLAGS_ERIKA_REMATCH ; 81 + const DAILYFLAGS_JANINE_REMATCH ; 82 + const DAILYFLAGS_SABRINA_REMATCH ; 83 + const DAILYFLAGS_BLAINE_REMATCH ; 84 + const DAILYFLAGS_BLUE_REMATCH ; 85 ; wDailyFlags2:: const_def diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm index 0adecabfc..9b65fc9fd 100644 --- a/data/events/engine_flags.asm +++ b/data/events/engine_flags.asm @@ -187,6 +187,22 @@ EngineFlags: engine_flag wDailyFlags1, DAILYFLAGS_MOUNT_MOON_B2F_MUSHROOM engine_flag wDailyFlags1, DAILYFLAGS_ROUTE13_BERRY engine_flag wDailyFlags1, DAILYFLAGS_SILVER_CAVE_OUTSIDE_BERRY + engine_flag wDailyFlags1, DAILYFLAGS_FALKNER_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_BUGSY_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_WHITNEY_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_MORTY_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_CHUCK_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_JASMINE_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_PRYCE_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_CLAIR_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_BROCK_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_MISTY_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_LTSURGE_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_ERIKA_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_JANINE_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_SABRINA_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_BLAINE_REMATCH + engine_flag wDailyFlags1, DAILYFLAGS_BLUE_REMATCH engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F diff --git a/data/tilesets/underground_collision.asm b/data/tilesets/underground_collision.asm index e4cee7495..d165f214f 100644 --- a/data/tilesets/underground_collision.asm +++ b/data/tilesets/underground_collision.asm @@ -62,3 +62,6 @@ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 3d tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f + tilecoll FLOOR, WALL, WARP_PANEL, WALL ; 40 + tilecoll FLOOR, FLOOR, WARP_PANEL, FLOOR ; 41 + tilecoll FLOOR, WALL, FLOOR, WALL ; 42 diff --git a/data/tilesets/underground_metatiles.bin b/data/tilesets/underground_metatiles.bin index 28b807e1e..a2bb3490f 100644 --- a/data/tilesets/underground_metatiles.bin +++ b/data/tilesets/underground_metatiles.bin @@ -1,2 +1,2 @@ -*+:;,-<=EFUV 0144444444   44 444444      CDCDSTSTCDCDSTST        "#23                      - QQQQQQQQ./>?./>?@ANOP]^_&'67             01 01@AAAPQQQPQQQAAABQQQRQQQR@AABPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQR@B@B()89()89 \ No newline at end of file +*+:;,-<=EFUV 0144444444   44 444444      CDCDSTSTCDCDSTST        bcrs                      + QQQQQQQQ./>?./>?@ANOP]^_&'67             01 01@AAAPQQQPQQQAAABQQQRQQQR@AABPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQR@B@B()89()89  `a pq `apq  "# 23 \ No newline at end of file diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index c5c3cf141..0b989d3db 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -935,6 +935,7 @@ MovementFunction_BoulderDust: add hl, de ld a, [hl] inc a +; add a ld hl, OBJECT_STEP_DURATION add hl, bc ld [hl], a diff --git a/gfx/tilesets/underground.png b/gfx/tilesets/underground.png index c86f5aaaf..d03339b60 100644 Binary files a/gfx/tilesets/underground.png and b/gfx/tilesets/underground.png differ diff --git a/gfx/tilesets/underground_palette_map.asm b/gfx/tilesets/underground_palette_map.asm index aeef04201..6de1d601c 100644 --- a/gfx/tilesets/underground_palette_map.asm +++ b/gfx/tilesets/underground_palette_map.asm @@ -10,19 +10,6 @@ tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY tilepal 0, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, GRAY tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF - tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF - tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF - tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, TEXT - tilepal 1, GRAY, GRAY, RED, WATER, WATER, WATER, WATER, RED - tilepal 1, RED, GRAY, WATER, WATER, WATER, WATER, GRAY, GRAY - tilepal 1, GRAY, RED, RED, WATER, WATER, WATER, WATER, RED - tilepal 1, RED, GRAY, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN - tilepal 1, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY - tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN - tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY - tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN - tilepal 1, GRAY, GRAY, GRAY, BROWN, BROWN, YELLOW, YELLOW, GRAY - tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY - tilepal 1, GRAY, GRAY, GRAY, BROWN, BROWN, YELLOW, YELLOW, GRAY - tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, ROOF, ROOF \ No newline at end of file diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm index e60436246..14cce6872 100644 --- a/maps/AzaleaGym.asm +++ b/maps/AzaleaGym.asm @@ -15,6 +15,9 @@ AzaleaGym_MapScripts: AzaleaGymBugsyScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_BUGSY iftrue .FightDone writetext BugsyText_INeverLose @@ -56,6 +59,23 @@ AzaleaGymBugsyScript: closetext end +.rematch: + checkflag ENGINE_DAILY_BUGSY_REMATCH + iftrue .skip_rematch + writetext BugsyRematchIntroText + waitbutton + closetext + winlosstext BugsyRematchWinLossText, 0 + loadtrainer BUGSY, BUGSY2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_BUGSY_REMATCH + opentext + writetext BugsyRematchAfterBattleText + waitbutton + closetext + end + AzaleaGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -359,6 +379,25 @@ AzaleaGymGuideWinText: cont "#MON is bright!" done +BugsyRematchIntroText: + text "Good to see you" + line "again!" + + para "Behold my bug" + line "research!" + done + +BugsyRematchWinLossText: + text "Aw, that's the" + line "end of it…" + done + +BugsyRematchAfterBattleText: + text "You must have" + line "studied a lot" + cont "about #MON!" + done + AzaleaGym_MapEvents: db 0, 0 ; filler diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm index fcdce6fb8..2806099d4 100644 --- a/maps/BlackthornGym1F.asm +++ b/maps/BlackthornGym1F.asm @@ -29,6 +29,9 @@ BlackthornGym1FBouldersCallback: BlackthornGymClairScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_RISINGBADGE iftrue .AlreadyGotBadge checkevent EVENT_BEAT_CLAIR @@ -90,6 +93,23 @@ BlackthornGymClairScript: closetext end +.rematch: + checkflag ENGINE_DAILY_CLAIR_REMATCH + iftrue .skip_rematch + writetext ClairRematchIntroText + waitbutton + closetext + winlosstext ClairWinText, 0 + loadtrainer CLAIR, CLAIR2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_CLAIR_REMATCH + opentext + writetext ClairRematchAfterBattleText + waitbutton + closetext + end + TrainerCooltrainermPaul: trainer COOLTRAINERM, PAUL, EVENT_BEAT_COOLTRAINERM_PAUL, CooltrainermPaulSeenText, CooltrainermPaulBeatenText, 0, .Script @@ -384,6 +404,19 @@ BlackthornGymGuideWinText: cont "#MON CHAMPION!" done +ClairRematchIntroText: + text "…You are here." + line "Now let's battle!" + done + +ClairRematchAfterBattleText: + text "Way to go." + line "…" + + para "Now give it your" + line "all!" + done + BlackthornGym1F_MapEvents: db 0, 0 ; filler diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm index edea5a072..cb4a57cb3 100644 --- a/maps/BrunosRoom.asm +++ b/maps/BrunosRoom.asm @@ -49,7 +49,13 @@ BrunoScript_Battle: waitbutton closetext winlosstext BrunoScript_BrunoBeatenText, 0 + checkevent EVENT_BEAT_RED + iftrue .rematch loadtrainer BRUNO, BRUNO1 + sjump .battle +.rematch + loadtrainer BRUNO, BRUNO2 +.battle startbattle reloadmapafterbattle setevent EVENT_BEAT_ELITE_4_BRUNO diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm index 8c4bc8904..611fb0fdd 100644 --- a/maps/CeladonGym.asm +++ b/maps/CeladonGym.asm @@ -14,6 +14,9 @@ CeladonGym_MapScripts: CeladonGymErikaScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_RAINBOWBADGE iftrue .FightDone writetext ErikaBeforeBattleText @@ -47,6 +50,23 @@ CeladonGymErikaScript: closetext end +.rematch: + checkflag ENGINE_DAILY_ERIKA_REMATCH + iftrue .skip_rematch + writetext ErikaRematchIntroText + waitbutton + closetext + winlosstext ErikaRematchWinLossText, 0 + loadtrainer ERIKA, ERIKA2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_ERIKA_REMATCH + opentext + writetext ErikaRematchAfterBattleText + waitbutton + closetext + end + TrainerLassMichelle: trainer LASS, MICHELLE, EVENT_BEAT_LASS_MICHELLE, LassMichelleSeenText, LassMichelleBeatenText, 0, .Script @@ -265,6 +285,33 @@ TwinsJoAndZoe2AfterBattleText: line "much stronger!" done +ErikaRematchIntroText: + text "ERIKA: How are" + line "you? Good to see" + cont "you again!" + + para "I just love the" + line "fragrance here…" + + para "but…let's ignore" + line "that and battle!" + done + +ErikaRematchWinLossText: + text "Looks like I un-" + line "derestimated you…" + + para "I'll bow out" + line "gracefully." + done + +ErikaRematchAfterBattleText: + text "ERIKA: Oh my!" + + para "You have grown" + line "even stronger…" + done + CeladonGym_MapEvents: db 0, 0 ; filler diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm index ff673a3ff..b54c055f3 100644 --- a/maps/CeruleanGym.asm +++ b/maps/CeruleanGym.asm @@ -59,6 +59,9 @@ CeruleanGymGruntRunsOutScript: CeruleanGymMistyScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_CASCADEBADGE iftrue .FightDone writetext MistyIntroText @@ -85,6 +88,23 @@ CeruleanGymMistyScript: closetext end +.rematch: + checkflag ENGINE_DAILY_MISTY_REMATCH + iftrue .skip_rematch + writetext MistyRematchIntroText + waitbutton + closetext + winlosstext MistyRematchWinLossText, 0 + loadtrainer MISTY, MISTY2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_MISTY_REMATCH + opentext + writetext MistyRematchAfterBattleText + waitbutton + closetext + end + TrainerSwimmerfDiana: trainer SWIMMERF, DIANA, EVENT_BEAT_SWIMMERF_DIANA, SwimmerfDianaSeenText, SwimmerfDianaBeatenText, 0, .Script @@ -427,6 +447,34 @@ CeruleanGymGuideWinText: cont "great battle!" done +MistyRematchIntroText: + text "MISTY: So here you" + line "are… Don't make me" + cont "wait!" + + para "I've heard lots of" + line "good things about" + + para "you since our last" + line "battle." + + para "Let me test how" + line "good you are!" + done + +MistyRematchWinLossText: + text "Looks like this is" + line "it…" + done + +MistyRematchAfterBattleText: + text "MISTY: Wow!" + line "You are getting" + + para "stronger with each" + line "battle!" + done + CeruleanGym_MapEvents: db 0, 0 ; filler diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm index 55cc84c99..85795c285 100644 --- a/maps/CianwoodGym.asm +++ b/maps/CianwoodGym.asm @@ -17,6 +17,9 @@ CianwoodGym_MapScripts: CianwoodGymChuckScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_CHUCK iftrue .FightDone writetext ChuckIntroText1 @@ -73,6 +76,23 @@ CianwoodGymChuckScript: closetext end +.rematch: + checkflag ENGINE_DAILY_CHUCK_REMATCH + iftrue .skip_rematch + writetext ChuckRematchIntroText + waitbutton + closetext + winlosstext ChuckRematchWinLossText, 0 + loadtrainer CHUCK, CHUCK2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_CHUCK_REMATCH + opentext + writetext ChuckRematchAfterBattleText + waitbutton + closetext + end + CianwoodGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -303,6 +323,24 @@ BlackbeltLungAfterText: cont "shattered…" done +ChuckRematchIntroText: + text "There you are!" + + para "Taste my 24-hour" + line "training!" + done + +ChuckRematchWinLossText: + text "We…lost…" + done + +ChuckRematchAfterBattleText: + text "Wahaha!" + + para "A battle with you" + line "is never boring!" + done + CianwoodGym_MapEvents: db 0, 0 ; filler diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm index 30cafd16f..0bef6a3d5 100644 --- a/maps/EcruteakGym.asm +++ b/maps/EcruteakGym.asm @@ -24,6 +24,9 @@ EcruteakGymNoopScene: EcruteakGymMortyScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_MORTY iftrue .FightDone writetext MortyIntroText @@ -68,6 +71,23 @@ EcruteakGymMortyScript: closetext end +.rematch: + checkflag ENGINE_DAILY_MORTY_REMATCH + iftrue .skip_rematch + writetext MortyRematchIntroText + waitbutton + closetext + winlosstext MortyRematchWinLossText, 0 + loadtrainer MORTY, MORTY2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_MORTY_REMATCH + opentext + writetext MortyRematchAfterBattleText + waitbutton + closetext + end + EcruteakGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -384,6 +404,26 @@ EcruteakGymClosedText: para "Hohohoho." done +MortyRematchIntroText: + text "I was just talk-" + line "ing about you…" + + para "Let's battle!" + done + +MortyRematchWinLossText: + text "How is this" + line "possible…" + done + +MortyRematchAfterBattleText: + text "I've lost again…" + + para "You may have some-" + line "thing more than" + cont "just strength." + done + EcruteakGym_MapEvents: db 0, 0 ; filler diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm index 1560c98a6..0388903d3 100644 --- a/maps/FuchsiaGym.asm +++ b/maps/FuchsiaGym.asm @@ -12,6 +12,9 @@ FuchsiaGym_MapScripts: def_callbacks FuchsiaGymJanineScript: + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_SOULBADGE iftrue .FightDone applymovement FUCHSIAGYM_JANINE, Movement_NinjaSpin @@ -57,6 +60,25 @@ FuchsiaGymJanineScript: closetext end +.rematch: + faceplayer + opentext + checkflag ENGINE_DAILY_JANINE_REMATCH + iftrue .skip_rematch + writetext JanineRematchIntroText + waitbutton + closetext + winlosstext JanineRematchWinLossText, 0 + loadtrainer JANINE, JANINE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_JANINE_REMATCH + opentext + writetext JanineRematchAfterBattleText + waitbutton + closetext + end + LassAliceScript: checkevent EVENT_BEAT_LASS_ALICE iftrue .AliceUnmasked @@ -378,6 +400,24 @@ FuchsiaGymGuideWinText: cont "from JOHTO!" done +JanineRematchIntroText: + text "JANINE: I can't" + line "use my ninja tech-" + cont "nique, but I won't" + cont "let you win!" + done + +JanineRematchWinLossText: + text "…!!!" + line "So… So strong!" + done + +JanineRematchAfterBattleText: + text "JANINE: I lost" + line "today, but I'll" + cont "win next time!" + done + FuchsiaGym_MapEvents: db 0, 0 ; filler diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm index a699666e8..83ace3aa7 100644 --- a/maps/GoldenrodGym.asm +++ b/maps/GoldenrodGym.asm @@ -21,6 +21,9 @@ GoldenrodGymNoop2Scene: GoldenrodGymWhitneyScript: faceplayer + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_WHITNEY iftrue .FightDone opentext @@ -79,6 +82,24 @@ GoldenrodGymWhitneyScript: closetext end +.rematch: + checkflag ENGINE_DAILY_WHITNEY_REMATCH + iftrue .skip_rematch + opentext + writetext WhitneyRematchIntroText + waitbutton + closetext + winlosstext WhitneyRematchWinLossText, 0 + loadtrainer WHITNEY, WHITNEY2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_WHITNEY_REMATCH + opentext + writetext WhitneyRematchAfterBattleText + waitbutton + closetext + end + GoldenrodGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -377,6 +398,25 @@ GoldenrodGymGuideWinText: cont "the ladies here." done +WhitneyRematchIntroText: + text "I never turn down" + line "a rematch!" + + para "Are you ready?" + done + +WhitneyRematchWinLossText: + text "Ugh…" + done + +WhitneyRematchAfterBattleText: + text "You really are" + line "strong!" + + para "But I won't lose" + line "next time!" + done + GoldenrodGym_MapEvents: db 0, 0 ; filler diff --git a/maps/HallOfFame.asm b/maps/HallOfFame.asm index f5000cb23..e3cc17fe3 100644 --- a/maps/HallOfFame.asm +++ b/maps/HallOfFame.asm @@ -34,22 +34,6 @@ HallOfFameEnterScript: setevent EVENT_TELEPORT_GUY setevent EVENT_RIVAL_SPROUT_TOWER clearevent EVENT_RED_IN_MT_SILVER - clearevent EVENT_BEAT_FALKNER_REMATCH - clearevent EVENT_BEAT_BUGSY_REMATCH - clearevent EVENT_BEAT_WHITNEY_REMATCH - clearevent EVENT_BEAT_MORTY_REMATCH - clearevent EVENT_BEAT_CHUCK_REMATCH - clearevent EVENT_BEAT_JASMINE_REMATCH - clearevent EVENT_BEAT_PRYCE_REMATCH - clearevent EVENT_BEAT_CLAIR_REMATCH - clearevent EVENT_BEAT_BROCK_REMATCH - clearevent EVENT_BEAT_MISTY_REMATCH - clearevent EVENT_BEAT_LT_SURGE_REMATCH - clearevent EVENT_BEAT_ERIKA_REMATCH - clearevent EVENT_BEAT_JANINE_REMATCH - clearevent EVENT_BEAT_SABRINA_REMATCH - clearevent EVENT_BEAT_BLAINE_REMATCH - clearevent EVENT_BEAT_BLUE_REMATCH setevent EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME clearevent EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME special RespawnOneOffs diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm index 08c60afd2..f592e5bc5 100644 --- a/maps/KarensRoom.asm +++ b/maps/KarensRoom.asm @@ -49,7 +49,13 @@ KarenScript_Battle: waitbutton closetext winlosstext KarenScript_KarenBeatenText, 0 + checkevent EVENT_BEAT_RED + iftrue .rematch loadtrainer KAREN, KAREN1 + sjump .battle +.rematch + loadtrainer KAREN, KAREN2 +.battle startbattle reloadmapafterbattle setevent EVENT_BEAT_ELITE_4_KAREN diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm index 85c58d08f..22b2902c2 100644 --- a/maps/KogasRoom.asm +++ b/maps/KogasRoom.asm @@ -49,7 +49,13 @@ KogaScript_Battle: waitbutton closetext winlosstext KogaScript_KogaBeatenText, 0 + checkevent EVENT_BEAT_RED + iftrue .rematch loadtrainer KOGA, KOGA1 + sjump .battle +.rematch + loadtrainer KOGA, KOGA2 +.battle startbattle reloadmapafterbattle setevent EVENT_BEAT_ELITE_4_KOGA diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm index 5019b47d0..d4eef31bf 100644 --- a/maps/LancesRoom.asm +++ b/maps/LancesRoom.asm @@ -57,7 +57,13 @@ LancesRoomLanceScript: closetext winlosstext LanceBattleWinText, 0 setlasttalked LANCESROOM_LANCE + checkevent EVENT_BEAT_RED + iftrue .rematch loadtrainer CHAMPION, LANCE1 + sjump .battle +.rematch + loadtrainer CHAMPION, LANCE2 +.battle startbattle dontrestartmapmusic reloadmapafterbattle diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm index 7c5cf037f..a940bfa7c 100644 --- a/maps/MahoganyGym.asm +++ b/maps/MahoganyGym.asm @@ -15,6 +15,9 @@ MahoganyGym_MapScripts: MahoganyGymPryceScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_PRYCE iftrue .FightDone writetext PryceText_Intro @@ -34,7 +37,7 @@ MahoganyGymPryceScript: scall MahoganyGymActivateRockets .FightDone: checkevent EVENT_GOT_TM16_ICY_WIND - iftrue PryceScript_Defeat + iftrue .PryceScript_Defeat setevent EVENT_BEAT_SKIER_ROXANNE setevent EVENT_BEAT_SKIER_CLARISSA setevent EVENT_BEAT_BOARDER_RONALD @@ -43,17 +46,34 @@ MahoganyGymPryceScript: writetext PryceText_GlacierBadgeSpeech promptbutton verbosegiveitem TM_ICY_WIND - iffalse MahoganyGym_NoRoomForIcyWind + iffalse .MahoganyGym_NoRoomForIcyWind setevent EVENT_GOT_TM16_ICY_WIND writetext PryceText_IcyWindSpeech waitbutton closetext end -PryceScript_Defeat: +.PryceScript_Defeat: writetext PryceText_CherishYourPokemon waitbutton -MahoganyGym_NoRoomForIcyWind: +.MahoganyGym_NoRoomForIcyWind: + closetext + end + +.rematch: + checkflag ENGINE_DAILY_PRYCE_REMATCH + iftrue .skip_rematch + writetext PryceRematchIntroText + waitbutton + closetext + winlosstext PryceRematchWinLossText, 0 + loadtrainer PRYCE, PRYCE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_PRYCE_REMATCH + opentext + writetext PryceRematchAfterBattleText + waitbutton closetext end @@ -370,6 +390,29 @@ MahoganyGymGuideWinText: line "eration gap!" done +PryceRematchIntroText: + text "Finally." + + para "No need for words." + line "A #MON battle" + + para "is the way for us" + line "to communicate." + done + +PryceRematchWinLossText: + text "I understand…" + + para "I'll bow out" + line "gracefully." + done + +PryceRematchAfterBattleText: + text "Hmm… It's still a" + line "long way to become" + cont "the best trainer…" + done + MahoganyGym_MapEvents: db 0, 0 ; filler diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm index 2b59ca1c5..d94c8dd34 100644 --- a/maps/OlivineGym.asm +++ b/maps/OlivineGym.asm @@ -10,6 +10,9 @@ OlivineGym_MapScripts: OlivineGymJasmineScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_JASMINE iftrue .FightDone writetext Jasmine_SteelTypeIntro @@ -47,6 +50,23 @@ OlivineGymJasmineScript: closetext end +.rematch: + checkflag ENGINE_DAILY_JASMINE_REMATCH + iftrue .skip_rematch + writetext JasmineRematchIntroText + waitbutton + closetext + winlosstext JasmineRematchWinLossText, 0 + loadtrainer JASMINE, JASMINE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_JASMINE_REMATCH + opentext + writetext JasmineRematchAfterBattleText + waitbutton + closetext + end + OlivineGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -195,6 +215,23 @@ OlivineGymGuidePreText: cont "sionate." done +JasmineRematchIntroText: + text "I have just re-" + line "turned from visit-" + cont "ing AMPHY…" + + para "Are you prepared?" + done + +JasmineRematchWinLossText: + text "Well done…" + done + +JasmineRematchAfterBattleText: + text "True to your" + line "reputation…" + done + OlivineGym_MapEvents: db 0, 0 ; filler diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm index e4fba843a..73e33fe4d 100644 --- a/maps/PewterGym.asm +++ b/maps/PewterGym.asm @@ -11,6 +11,9 @@ PewterGym_MapScripts: PewterGymBrockScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_BOULDERBADGE iftrue .FightDone writetext BrockIntroText @@ -39,6 +42,23 @@ PewterGymBrockScript: closetext end +.rematch: + checkflag ENGINE_DAILY_BROCK_REMATCH + iftrue .skip_rematch + writetext BrockRematchIntroText + waitbutton + closetext + winlosstext BrockRematchWinLossText, 0 + loadtrainer BROCK, BROCK2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_BROCK_REMATCH + opentext + writetext BrockRematchAfterBattleText + waitbutton + closetext + end + TrainerCamperJerry: trainer CAMPER, JERRY, EVENT_BEAT_CAMPER_JERRY, CamperJerrySeenText, CamperJerryBeatenText, 0, .Script @@ -232,6 +252,30 @@ PewterGymGuideWinText: para "inspiring. I mean" line "that seriously." done + +BrockRematchIntroText: + text "BROCK: All right!" + + para "Time to show you" + line "my #MON's rock-" + cont "hard defense!" + + para "Let's go!" + done + +BrockRematchWinLossText: + text "Looks like you're" + line "the stronger one…" + done + +BrockRematchAfterBattleText: + text "BROCK: I've lost" + line "again…" + + para "You aren't adven-" + line "turing around for" + cont "nothing!" + done PewterGym_MapEvents: db 0, 0 ; filler diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm index 32f501044..291f41ae3 100644 --- a/maps/SaffronGym.asm +++ b/maps/SaffronGym.asm @@ -10,10 +10,21 @@ SaffronGym_MapScripts: def_scene_scripts def_callbacks + callback MAPCALLBACK_TILES, SaffronGymWarpPanelCallback + +SaffronGymWarpPanelCallback: + checkevent EVENT_BEAT_SABRINA + iffalse .skip + changeblock 12, 14, $40 ; warp panel active +.skip + endcallback SaffronGymSabrinaScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_MARSHBADGE iftrue .FightDone writetext SabrinaIntroText @@ -28,6 +39,7 @@ SaffronGymSabrinaScript: setevent EVENT_BEAT_MEDIUM_DORIS setevent EVENT_BEAT_PSYCHIC_FRANKLIN setevent EVENT_BEAT_PSYCHIC_JARED + changeblock 12, 14, $40 ; warp panel active opentext writetext ReceivedMarshBadgeText playsound SFX_GET_BADGE @@ -44,6 +56,23 @@ SaffronGymSabrinaScript: closetext end +.rematch: + checkflag ENGINE_DAILY_SABRINA_REMATCH + iftrue .skip_rematch + writetext SabrinaRematchIntroText + waitbutton + closetext + winlosstext SabrinaRematchWinLossText, 0 + loadtrainer SABRINA, SABRINA2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_SABRINA_REMATCH + opentext + writetext SabrinaRematchAfterBattleText + waitbutton + closetext + end + TrainerMediumRebecca: trainer MEDIUM, REBECCA, EVENT_BEAT_MEDIUM_REBECCA, MediumRebeccaSeenText, MediumRebeccaBeatenText, 0, .Script @@ -288,6 +317,27 @@ SaffronGymGuideWinText: line "fantastic battle!" done +SabrinaRematchIntroText: + text "SABRINA: I knew" + line "you'd come again…" + + para "I had a feeling." + + para "Let me test you" + line "once more." + done + +SabrinaRematchWinLossText: + text "I get it…" + done + +SabrinaRematchAfterBattleText: + text "SABRINA: I know…" + + para "You will battle me" + line "again sometime." + done + SaffronGym_MapEvents: db 0, 0 ; filler @@ -323,7 +373,9 @@ SaffronGym_MapEvents: warp_event 15, 11, SAFFRON_GYM, 14 warp_event 15, 3, SAFFRON_GYM, 15 warp_event 1, 3, SAFFRON_GYM, 16 - warp_event 11, 9, SAFFRON_GYM, 17 + warp_event 11, 11, SAFFRON_GYM, 17 + warp_event 8, 11, SAFFRON_GYM, 34 + warp_event 12, 15, SAFFRON_GYM, 33 def_coord_events diff --git a/maps/SaffronGym.blk b/maps/SaffronGym.blk index 6c5e10c94..9d827379b 100644 --- a/maps/SaffronGym.blk +++ b/maps/SaffronGym.blk @@ -1,4 +1,4 @@          -         -   6   $   \ No newline at end of file +      A   +   6B   $   \ No newline at end of file diff --git a/maps/SeafoamGym.asm b/maps/SeafoamGym.asm index c90a81148..13df6f353 100644 --- a/maps/SeafoamGym.asm +++ b/maps/SeafoamGym.asm @@ -27,6 +27,9 @@ SeafoamGymNoopScene: SeafoamGymBlaineScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_VOLCANOBADGE iftrue .FightDone writetext BlaineIntroText @@ -61,6 +64,23 @@ SeafoamGymBlaineScript: closetext end +.rematch: + checkflag ENGINE_DAILY_BLAINE_REMATCH + iftrue .skip_rematch + writetext BlaineRematchIntroText + waitbutton + closetext + winlosstext BlaineRematchWinLossText, 0 + loadtrainer BLAINE, BLAINE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_BLAINE_REMATCH + opentext + writetext BlaineRematchAfterBattleText + waitbutton + closetext + end + TrainerScientistLowell: faceplayer opentext @@ -528,6 +548,35 @@ SuperNerdMerleAfterBattleText: line "you are." done +BlaineRematchIntroText: + text "BLAINE: Your back" + line "for a rematch?" + + para "Great stuff kiddo!" + + para "Let's have another" + line "scorching battle!" + done + +BlaineRematchWinLossText: + text "I lost the battle," + line "but my fiery soul" + + para "hasn't fizzled" + line "out!" + done + +BlaineRematchAfterBattleText: + text "BLAINE: Waaah!" + + para "If I had known you" + line "were coming, I" + + para "would have made" + line "us some CINNABAR" + cont "VOLCANO BURGERS!" + done + SeafoamGym_MapEvents: db 0, 0 ; filler diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm index b5a467489..9af461075 100644 --- a/maps/SilverCaveRoom3.asm +++ b/maps/SilverCaveRoom3.asm @@ -36,22 +36,6 @@ Red: special FadeInQuickly pause 30 setevent EVENT_BEAT_RED - clearevent EVENT_BEAT_FALKNER_REMATCH - clearevent EVENT_BEAT_BUGSY_REMATCH - clearevent EVENT_BEAT_WHITNEY_REMATCH - clearevent EVENT_BEAT_MORTY_REMATCH - clearevent EVENT_BEAT_CHUCK_REMATCH - clearevent EVENT_BEAT_JASMINE_REMATCH - clearevent EVENT_BEAT_PRYCE_REMATCH - clearevent EVENT_BEAT_CLAIR_REMATCH - clearevent EVENT_BEAT_BROCK_REMATCH - clearevent EVENT_BEAT_MISTY_REMATCH - clearevent EVENT_BEAT_LT_SURGE_REMATCH - clearevent EVENT_BEAT_ERIKA_REMATCH - clearevent EVENT_BEAT_JANINE_REMATCH - clearevent EVENT_BEAT_SABRINA_REMATCH - clearevent EVENT_BEAT_BLAINE_REMATCH - clearevent EVENT_BEAT_BLUE_REMATCH special HealParty refreshscreen credits diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm index 0cb9d2b7a..426713438 100644 --- a/maps/VermilionGym.asm +++ b/maps/VermilionGym.asm @@ -196,6 +196,9 @@ CheckVermilionGymTrashCan: VermilionGymSurgeScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_THUNDERBADGE iftrue .FightDone writetext LtSurgeIntroText @@ -225,6 +228,23 @@ VermilionGymSurgeScript: closetext end +.rematch: + checkflag ENGINE_DAILY_LTSURGE_REMATCH + iftrue .skip_rematch + writetext LtSurgeRematchIntroText + waitbutton + closetext + winlosstext LtSurgeRematchWinLossText, 0 + loadtrainer LT_SURGE, LT_SURGE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_LTSURGE_REMATCH + opentext + writetext LtSurgeRematchAfterBattleText + waitbutton + closetext + end + TrainerGentlemanGregory: trainer GENTLEMAN, GREGORY, EVENT_BEAT_GENTLEMAN_GREGORY, GentlemanGregorySeenText, GentlemanGregoryBeatenText, 0, .Script @@ -469,6 +489,30 @@ VermilionGymResetSwitchesText: line "locks were reset!" done +LtSurgeRematchIntroText: + text "SURGE: Hey!" + + para "Your back for" + line "more?" + + para "Then we'll elec-" + line "trify you!" + done + +LtSurgeRematchWinLossText: + text "My electric trick…" + done + +LtSurgeRematchAfterBattleText: + text "SURGE: Arrrgh!" + + para "You are major" + line "strong kid!" + + para "But I will repay" + line "my debt someday." + done + VermilionGym_MapEvents: db 0, 0 ; filler diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm index d7ade0fcd..f437403dc 100644 --- a/maps/VioletGym.asm +++ b/maps/VioletGym.asm @@ -12,6 +12,9 @@ VioletGym_MapScripts: VioletGymFalknerScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkevent EVENT_BEAT_FALKNER iftrue .FightDone writetext FalknerIntroText @@ -53,6 +56,23 @@ VioletGymFalknerScript: closetext end +.rematch: + checkflag ENGINE_DAILY_FALKNER_REMATCH + iftrue .skip_rematch + writetext FalknerRematchIntroText + waitbutton + closetext + winlosstext FalknerRematchWinLossText, 0 + loadtrainer FALKNER, FALKNER2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_FALKNER_REMATCH + opentext + writetext FalknerRematchAfterBattleText + waitbutton + closetext + end + VioletGymActivateRockets: ifequal 7, .RadioTowerRockets ifequal 6, .GoldenrodRockets @@ -281,6 +301,27 @@ VioletGymGuideWinText: line "time at all!" done +FalknerRematchIntroText: + text "Hi! I've been" + line "waiting for you!" + + para "It's a pleasure to" + line "battle you again!" + done + +FalknerRematchWinLossText: + text "I understand…" + + para "I'll bow out" + line "gracefully." + done + +FalknerRematchAfterBattleText: + text "Hmm… It's still a" + line "long way to become" + cont "the best trainer…" + done + VioletGym_MapEvents: db 0, 0 ; filler diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm index bb97e539f..dfc7a2d9d 100644 --- a/maps/ViridianGym.asm +++ b/maps/ViridianGym.asm @@ -10,6 +10,9 @@ ViridianGym_MapScripts: ViridianGymBlueScript: faceplayer opentext + checkevent EVENT_BEAT_RED + iftrue .rematch +.skip_rematch checkflag ENGINE_EARTHBADGE iftrue .FightDone writetext LeaderBlueBeforeText @@ -40,6 +43,23 @@ ViridianGymBlueScript: closetext end +.rematch: + checkflag ENGINE_DAILY_BLUE_REMATCH + iftrue .skip_rematch + writetext BlueRematchIntroText + waitbutton + closetext + winlosstext BlueRematchWinLossText, 0 + loadtrainer BLUE, BLUE2 + startbattle + reloadmapafterbattle + setflag ENGINE_DAILY_BLUE_REMATCH + opentext + writetext BlueRematchAfterBattleText + waitbutton + closetext + end + ViridianGymGuideScript: faceplayer opentext @@ -332,6 +352,28 @@ CooltrainerfSalmaAfterBattleText: line "this one!" done +BlueRematchIntroText: + text "BLUE: Good!" + + para "Thanks for coming" + line "to lose to me!" + done + +BlueRematchWinLossText: + text "Just as I expect-" + line "ed!" + + para "No wonder you be-" + line "came CHAMPION…" + done + +BlueRematchAfterBattleText: + text "BLUE: Hahaha!" + + para "My scare tactics" + line "don't scare you!" + done + ViridianGym_MapEvents: db 0, 0 ; filler diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm index 0dbcf8774..0c14ca515 100644 --- a/maps/WillsRoom.asm +++ b/maps/WillsRoom.asm @@ -49,7 +49,13 @@ WillScript_Battle: waitbutton closetext winlosstext WillScript_WillBeatenText, 0 + checkevent EVENT_BEAT_RED + iftrue .rematch loadtrainer WILL, WILL1 + sjump .battle +.rematch + loadtrainer WILL, WILL2 +.battle startbattle reloadmapafterbattle setevent EVENT_BEAT_ELITE_4_WILL diff --git a/ram/wram.asm b/ram/wram.asm index 0872a6f60..44cec018b 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -3327,7 +3327,7 @@ wWhichMomItemSet:: db wMomItemTriggerBalance:: ds 3 wDailyResetTimer:: dw -wDailyFlags1:: ds 9 +wDailyFlags1:: ds 11 wDailyFlags2:: db wSwarmFlags:: db @@ -3339,7 +3339,7 @@ wFruitTreeFlags:: flag_array NUM_FRUIT_TREES wLuckyNumberDayTimer:: dw - ds 2 + wSpecialPhoneCallID:: db ds 3 wBugContestStartTime:: ds 4 ; day, hour, min, sec