diff --git a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml index 109c4a5930..bc9b624f1d 100644 --- a/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml +++ b/.github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml @@ -23,8 +23,9 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.7.0 (Default) + - 1.7.1 (Default) - upcoming (Edge) + - 1.7.0 - 1.6.2 - 1.6.1 - 1.6.0 diff --git a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml index 74e13a0a35..512a433eff 100644 --- a/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml +++ b/.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml @@ -23,8 +23,9 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.7.0 (Default) + - 1.7.1 (Default) - upcoming (Edge) + - 1.7.0 - 1.6.2 - 1.6.1 - 1.6.0 diff --git a/.github/ISSUE_TEMPLATE/04_other_errors.yaml b/.github/ISSUE_TEMPLATE/04_other_errors.yaml index c449e8b648..77d9a217de 100644 --- a/.github/ISSUE_TEMPLATE/04_other_errors.yaml +++ b/.github/ISSUE_TEMPLATE/04_other_errors.yaml @@ -23,8 +23,9 @@ body: label: Version description: What version of pokeemerald-expansion are you using as a base? options: - - 1.7.0 (Default) + - 1.7.1 (Default) - upcoming (Edge) + - 1.7.0 - 1.6.2 - 1.6.1 - 1.6.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b56aca136..c18fb7de37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Pokeemerald-Expansion Changelogs +## [Version 1.7.1](docs/changelogs/1.7.1.md) - Bugfix Release + ## [Version 1.7.0](docs/changelogs/1.7.0.md) - Feature Release -## [Version 1.6.2](docs/changelogs/1.6.2.md) - Bugfix release +## [Version 1.6.2](docs/changelogs/1.6.2.md) - Bugfix Release diff --git a/INSTALL.md b/INSTALL.md index f82649d7e2..0498b468ea 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -89,6 +89,7 @@ Some tips before proceeding: > If the above command does not work, try the above command but replacing `apt` with `apt-get`. + This will install GCC v10 on Ubuntu 22.04. pokeemerald-expansion works with GCC v10, but remote repositories and the RHH Team use GCC v13 for stricter error-checking. If you want to upgrade from v10 to v13, also follow the devkitpro install instructions. ### Choosing where to store pokeemerald (WSL1) WSL has its own file system that's not natively accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to store pokeemerald within Windows. @@ -408,6 +409,8 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for > Where *\* is the path of the folder [where you chose to store pokeemerald](#Choosing-where-to-store-pokeemerald-WSL1). Then run the `git clone` command again. +
+ Depreciated; installing agbcc is optional since 1.7.0. 2. Install agbcc into pokeemerald. The commands to run depend on certain conditions. **You should only follow one of the listed instructions**: - If agbcc has **not been built before** in the folder where you chose to store pokeemerald, run the following commands to build and install it into pokeemerald: @@ -445,6 +448,7 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for ```bash cd .. ``` +
Now you're ready to [build **pokeemerald**](#build-pokeemerald) ## Build pokeemerald diff --git a/Makefile b/Makefile index db883cb60c..d899015225 100644 --- a/Makefile +++ b/Makefile @@ -495,7 +495,7 @@ $(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS) $(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall tools check-tools @echo "cd $(OBJ_DIR) && $(LD) -T ld_script_test.ld -o ../../$@ " @cd $(OBJ_DIR) && $(LD) $(TESTLDFLAGS) -T ld_script_test.ld -o ../../$@ $(OBJS_REL) $(TEST_OBJS_REL) $(LIB) - $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent + $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) -d0 --silent $(PATCHELF) $(TESTELF) gTestRunnerArgv "$(TESTS)\0" ifeq ($(GITHUB_REPOSITORY_OWNER),rh-hideout) diff --git a/README.md b/README.md index c48adac1fe..5117bf22ed 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ pokeemerald-expansion is a decomp hack base project based off pret's [pokeemeral If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect. You can phrase it as the following: ``` -Based off RHH's pokeemerald-expansion v1.7.0 https://github.com/rh-hideout/pokeemerald-expansion/ +Based off RHH's pokeemerald-expansion v1.7.1 https://github.com/rh-hideout/pokeemerald-expansion/ ``` ## What features are included? @@ -166,7 +166,7 @@ With this, you'll get the latest version of pokeemerald-expansion, plus a couple ## **How do I update my version of pokeemerald-expansion?** - If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`. -- Once you have your remote set up, run the command `git pull RHH expansion/1.7.0`. +- Once you have your remote set up, run the command `git pull RHH expansion/1.7.1`. ### Please consider crediting the entire [list of contributors](https://github.com/rh-hideout/pokeemerald-expansion/wiki/Credits) in your project, as they have all worked hard to develop this project :) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index ff3eca273c..c7377378b7 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1566,6 +1566,10 @@ callnative BS_TryTriggerStatusForm .endm + .macro setphotongeysercategory + callnative BS_SetPhotonGeyserCategory + .endm + @ various command changed to more readable macros .macro cancelmultiturnmoves battler:req various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES @@ -2134,10 +2138,6 @@ .4byte \failInstr .endm - .macro photongeysercheck battler:req - various \battler, VARIOUS_PHOTON_GEYSER_CHECK - .endm - .macro shellsidearmcheck various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK .endm diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 389af990e6..a79fae484d 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -5389,11 +5389,11 @@ Move_FOUL_PLAY: createsprite gFoulPlayImpactTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, 0x1, 0x1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_M_VITAL_THROW SOUND_PAN_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0xa, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0xa, 0x0, 0x0 createsprite gFoulPlayRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 delay 0x8 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0xa, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0xa, 0x0, 0x0 createsprite gFoulPlayRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x100, 0x0 waitforvisualfinish clearmonbg ANIM_TARGET @@ -10409,7 +10409,7 @@ Move_LIGHT_OF_RUIN:: delay 0x10 createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x10, 0x0, 0x7FFF waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x1, 0x0, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x1, 0x0, 0x0, 0x0 waitforvisualfinish end LightOfRuinBeam: @@ -11147,7 +11147,7 @@ SolarBladeUnleash: loadspritegfx ANIM_TAG_SUNLIGHT @sun rays monbg ANIM_ATTACKER setalpha 13, 3 - createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 0, 6, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 0, 6, 0x7fff waitforvisualfinish playsewithpan SE_M_SWORDS_DANCE, SOUND_PAN_ATTACKER createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 16, 6, 1, 4 @@ -11164,7 +11164,7 @@ SolarBladeUnleash: delay 0x2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 12, 1 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 6, 0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 6, 0, 0x7fff waitforvisualfinish call UnsetPsychicBg clearmonbg ANIM_ATTACKER @@ -15389,7 +15389,7 @@ Move_SILK_TRAP:: Move_SNOWSCAPE:: loadspritegfx ANIM_TAG_SNOWFLAKES playsewithpan SE_M_GUST, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 0, 4, RGB(11, 18, 22) + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 0, 4, RGB(11, 18, 22) waitforvisualfinish createvisualtask AnimTask_CreateSnowflakes, 2, 0, 3, 120 createvisualtask AnimTask_CreateSnowflakes, 2, 0, 3, 120 @@ -15398,7 +15398,7 @@ Move_SNOWSCAPE:: playsewithpan SE_M_GUST2, SOUND_PAN_ATTACKER delay 30 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 4, 0, RGB(11, 18, 22) + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 4, 0, RGB(11, 18, 22) waitforvisualfinish end @@ -15560,7 +15560,7 @@ Move_DRAGON_ENERGY:: createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_ATTACKER, 0, 4, 0, 11, RGB(31, 28, 31) @;Pinkish White waitforvisualfinish playsewithpan SE_M_DETECT, SOUND_PAN_TARGET - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x10, 0x0, 0x2C5E @;Regidrago Reddish Reddish, Purple + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x10, 0x0, 0x2C5E @;Regidrago Reddish Reddish, Purple createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, -120, 0, 0, 1 @;Slide off off, screen waitforvisualfinish playsewithpan SE_M_SOLAR_BEAM, SOUND_PAN_TARGET @@ -16098,7 +16098,7 @@ Move_CHLOROBLAST:: createvisualtask AnimTask_AllBattlersVisible, 0xA, clearmonbg ANIM_DEF_PARTNER waitbgfadein - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x0, 0x0 @;From Black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x0, 0x0 @;From Black end ChloroblastShot: createsprite gSpriteTemplate_ChloroblastShot, ANIM_TARGET, 2, 0, 0, 0x19 @@ -16466,7 +16466,7 @@ Move_CEASELESS_EDGE:: createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 0x0, 0x5 waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA, - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x10, 0x0, 0x7FFF @;From White + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x10, 0x0, 0x7FFF @;From White waitforvisualfinish end @@ -16998,21 +16998,6 @@ Move_MALIGNANT_CHAIN:: Move_NONE: Move_MIRROR_MOVE: Move_POUND: -Move_833: -Move_834: -Move_835: -Move_836: -Move_837: -Move_838: -Move_839: -Move_840: -Move_841: -Move_842: -Move_843: -Move_844: -Move_845: -Move_846: -Move_847: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 @@ -21863,14 +21848,14 @@ Move_DRAGON_RAGE: Move_RAIN_DANCE: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 delay 120 delay 30 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -23303,7 +23288,7 @@ Move_SUNNY_DAY: loadspritegfx ANIM_TAG_SUNLIGHT monbg ANIM_ATK_PARTNER setalpha 13, 3 - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 0, 6, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 0, 6, RGB_WHITE waitforvisualfinish panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call SunnyDayLightRay @@ -23311,7 +23296,7 @@ Move_SUNNY_DAY: call SunnyDayLightRay call SunnyDayLightRay waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 6, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 6, 0, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -23527,9 +23512,9 @@ Move_HAZE: playsewithpan SE_M_HAZE, 0 createvisualtask AnimTask_HazeScrollingFog, 5 delay 30 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS, 2, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS_2, 2, 0, 16, RGB_BLACK delay 90 - createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS, 1, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_BATTLERS_2, 1, 16, 0, RGB_BLACK end Move_FIRE_PUNCH: @@ -24874,7 +24859,7 @@ Move_MORNING_SUN: loadspritegfx ANIM_TAG_BLUE_STAR createvisualtask AnimTask_MorningSunLightBeam, 5 delay 8 - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 8, 0, 12, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 8, 0, 12, RGB_WHITE delay 14 call MorningSunStar call MorningSunStar @@ -24891,7 +24876,7 @@ Move_MORNING_SUN: call MorningSunStar call MorningSunStar call MorningSunStar - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 3, 12, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 3, 12, 0, RGB_WHITE waitforvisualfinish waitsound call HealingEffect @@ -27196,13 +27181,13 @@ General_Rain: RainDrops: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_M_RAIN_DANCE, SOUND_PAN_ATTACKER - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 delay 50 waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 2, 4, 0, RGB_BLACK waitforvisualfinish return @@ -27651,14 +27636,14 @@ General_Rainbow:: call RainDrops delay 30 loadspritegfx ANIM_TAG_SUNLIGHT - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 0, 6, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 0, 6, RGB_WHITE waitforvisualfinish panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call SunnyDayLightRay call SunnyDayLightRay call SunnyDayLightRay waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS), 1, 6, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, (F_PAL_BG | F_PAL_BATTLERS_2), 1, 6, 0, RGB_WHITE waitforvisualfinish delay 30 fadetobg BG_RAINBOW @@ -28831,7 +28816,7 @@ FinishCorkscrewCrash: call CorkscrewCrashSprayRocks delay 0x6 call CorkscrewCrashSprayRocks - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x10, 0x7fff waitforvisualfinish delay 0x10 call ResetFromWhiteScreen @@ -28914,7 +28899,7 @@ FinishInfernoOverdrive: call InfernoOverdriveExplosion delay 0x6 call InfernoOverdriveExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x001b @ red bg pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x0, 0x10, 0x001b @ red bg pal delay 0x6 call InfernoOverdriveExplosion waitforvisualfinish @@ -29273,7 +29258,7 @@ BloomDoomPetalBlast: ResetFromGreenScreen: createvisualtask AnimTask_AllBattlersInvisible, 0xA waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x33ED @Everything from green + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x2, 0x0, 0x0, 0x33ED @Everything from green restorebg waitbgfadeout setarg 0x7 0xffff @@ -29897,7 +29882,7 @@ DevastatingDrakeUniversalEnding: waitforvisualfinish createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x2, 0x10, 0x0, 0x40c0 @ fade from purple waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x0 @ reset all colours + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x2, 0x0, 0x0, 0x0 @ reset all colours waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA waitforvisualfinish @@ -30090,7 +30075,7 @@ Move_BLACK_HOLE_ECLIPSE:: unloadspritegfx ANIM_TAG_BLACK_BALL_2 loadspritegfx ANIM_TAG_EXPLOSION_2 call BlackHoleEclipseExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x7fff @ bg to white pal + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x0, 0x10, 0x7fff @ bg to white pal call BlackHoleEclipseExplosion waitforvisualfinish delay 0x18 @@ -30121,7 +30106,7 @@ BlackHoleEclipseExplosion: ResetFromWhiteScreen: createvisualtask AnimTask_AllBattlersInvisible, 0xA waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x7FFF @everything from white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x2, 0x0, 0x0, 0x7FFF @everything from white restorebg waitbgfadeout setarg 0x7 0xffff @@ -30440,10 +30425,10 @@ CatastropikaFinish: call CatastropikaThundering call CatastropikaThundering call CatastropikaThundering - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff @ bg to white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x0, 0x10, 0x7fff @ bg to white call CatastropikaThundering waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x10, 0x0, 0x7fff @ bg to white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x10, 0x0, 0x7fff @ bg to white createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 @fix tgt position waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA @@ -30647,11 +30632,11 @@ Move_10000000_VOLT_THUNDERBOLT:: @ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x40, 0x28, 0x1, 0x8003 @ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x0, 0x37, 0x2c, 0x80, 0x28, 0x0, 0x8003 @ createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0x0, 0x00, 0x37, 0x2c, SOUND_PAN_ATTACKER, 0x28, 0x2, 0x8003 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x10, 0x7fff call TenMillionVoltThunderboltSparkGeyser waitforvisualfinish delay 0x10 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x10, 0x0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0x10, 0x0, 0x7fff waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA waitforvisualfinish @@ -30867,10 +30852,10 @@ StokedSparksurferSparkGeyser: Move_EXTREME_EVOBOOST:: loadspritegfx ANIM_TAG_LEER @leer - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0x0, 0x10, 0x0000 waitforvisualfinish createvisualtask AnimTask_AllBattlersInvisible, 0xA - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 3, 0, 0, 0 @Remove fading on everyone + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 3, 0, 0, 0 @Remove fading on everyone waitforvisualfinish playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 0x18, 0xfff4 @@ -31079,7 +31064,7 @@ PulverizingPancakeFinish: delay 0x5 loadspritegfx ANIM_TAG_EXPLOSION @explosion call PulverizingPancakeExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff @ everything goes white + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x10, 0x7fff @ everything goes white call PulverizingPancakeExplosion waitforvisualfinish call ResetFromWhiteScreen @@ -31172,7 +31157,7 @@ GenesisSupernovaFinish: unloadspritegfx ANIM_TAG_METEOR @superpower call GenesisSupernovaBubbleExplosion call GenesisSupernovaBubbleExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0x0, 0x10, 0x7fff call GenesisSupernovaBubbleExplosion waitforvisualfinish delay 0x10 @@ -31655,7 +31640,7 @@ Move_MALICIOUS_MOONSAULT:: call MaliciousMoonsaultExplosion delay 0x6 call MaliciousMoonsaultExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x1, 0x0, 0x10, 0x001b @ fade all to red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x0, 0x10, 0x001b @ fade all to red delay 0x6 call MaliciousMoonsaultExplosion createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0x0, 0x10 @@ -31978,10 +31963,10 @@ SplinteredStormshardsByPlayer: call SplinteredStormshardsExplosionOpponent call SplinteredStormshardsExplosionOpponent SplinteredStormshardsEnd: - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x0, 0x10, 0x7fff call SplinteredStormshardsBrownExplode waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x10, 0x0, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x10, 0x0, 0x7fff waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA waitforvisualfinish @@ -32227,7 +32212,7 @@ Move_LETS_SNUGGLE_FOREVER:: delay 0x8 call LetsSnuggleForeverTears waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x0000 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x10, 0x0000 waitforvisualfinish loadspritegfx ANIM_TAG_SPARKLE_4 @detect playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER @@ -32429,7 +32414,7 @@ ClangorousSoulblazeOnPlayer: createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x60, 0xffe0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x0, 0x10, 0x7fff playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0x65, 0xfff0, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 @@ -32500,7 +32485,7 @@ ClangorousSoulblazeOnOpponent: createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x60, 0x45, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_2 delay 0x5 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x0, 0x10, 0x7fff playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER createsprite gExplosionSpriteTemplate, ANIM_TARGET, 3, 0x65, 0x35, ANIM_ATTACKER, 0x1 call ClangorousSoulblazePulse_3 @@ -32654,7 +32639,7 @@ Move_GUARDIAN_OF_ALOLA:: call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser call GuardianOfAlolaRocksTarget - createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x3, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS_2), 0x3, 0x0, 0x10, 0x7fff call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser call GuardianOfAlolaRockGeyser @@ -32825,7 +32810,7 @@ SearingSunrazeSmashImpact: call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x4, 0x0, 0x10, 0x001b @full red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x4, 0x0, 0x10, 0x001b @full red call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno call SearingSunrazeSmashInferno @@ -32905,7 +32890,7 @@ SearingSunrazeSmashCharge: ResetFromRedScreen: createvisualtask AnimTask_AllBattlersInvisible, 0xA waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x1B @Everything from red + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x2, 0x0, 0x0, 0x1B @Everything from red restorebg waitbgfadeout setarg 0x7 0xffff @@ -33035,7 +33020,7 @@ MenacingMoonrazeMaelstromFinish: createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 76, 1 call MenacingMoonrazeMaelstromExplosion call MenacingMoonrazeMaelstromExplosion - createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x0, 0x10, 0x7fff + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x0, 0x10, 0x7fff call MenacingMoonrazeMaelstromExplosion waitforvisualfinish call ResetFromWhiteScreen @@ -33182,7 +33167,7 @@ Move_LIGHT_THAT_BURNS_THE_SKY:: clearmonbg ANIM_TARGET waitforvisualfinish delay 0x10 - createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS), 0x0, 0x10, 0x0, 0x43FF + createvisualtask AnimTask_BlendBattleAnimPal, 0x2, (F_PAL_BG | F_PAL_BATTLERS_2), 0x0, 0x10, 0x0, 0x43FF restorebg waitbgfadeout end @@ -33384,9 +33369,9 @@ Move_SOUL_STEALING_7_STAR_STRIKE:: waitforvisualfinish blendoff restorebg - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS), 0x2, 0x10, 0x0, 0x0 @everything from black + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x2, 0x10, 0x0, 0x0 @everything from black waitforvisualfinish - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS, 0x2, 0x0, 0x0, 0x0 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BATTLERS_2, 0x2, 0x0, 0x0, 0x0 waitforvisualfinish createvisualtask AnimTask_AllBattlersVisible, 0xA waitforvisualfinish diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index c70c76740a..afe7cf2719 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1242,28 +1242,8 @@ BattleScript_EffectShellSideArm: goto BattleScript_EffectHit BattleScript_EffectPhotonGeyser: - attackcanceler - accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE - attackstring - ppreduce - critcalc - damagecalc - adjustdamage - photongeysercheck BS_ATTACKER - attackanimation - waitanimation - effectivenesssound - hitanimation BS_TARGET - waitstate - healthbarupdate BS_TARGET - datahpupdate BS_TARGET - critmessage - waitmessage B_WAIT_TIME_LONG - resultmessage - waitmessage B_WAIT_TIME_LONG - seteffectwithchance - tryfaintmon BS_TARGET - goto BattleScript_MoveEnd + setphotongeysercategory + goto BattleScript_EffectHit BattleScript_EffectAuraWheel: @ Aura Wheel can only be used by Morpeko jumpifspecies BS_ATTACKER, SPECIES_MORPEKO_FULL_BELLY, BattleScript_EffectSpeedUpHit @@ -1696,15 +1676,28 @@ BattleScript_StrengthSapTryHp: attackanimation waitanimation BattleScript_StrengthSapHp: + jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_MoveEnd jumpiffullhp BS_ATTACKER, BattleScript_MoveEnd +BattleScript_StrengthSapManipulateDmg: manipulatedamage DMG_BIG_ROOT orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapLiquidOoze healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNENERGYDRAINED waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd +BattleScript_StrengthSapLiquidOoze: + call BattleScript_AbilityPopUpTarget + manipulatedamage DMG_CHANGE_SIGN + setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE + healthbarupdate BS_ATTACKER + datahpupdate BS_ATTACKER + printfromtable gAbsorbDrainStringIds + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER + goto BattleScript_MoveEnd BattleScript_StrengthSapMustLower: statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MoveEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_MoveEnd @@ -8103,6 +8096,7 @@ BattleScript_IllusionOff:: return BattleScript_CottonDownActivates:: + copybyte sSAVED_BATTLER, gBattlerAttacker showabilitypopup BS_TARGET pause B_WAIT_TIME_LONG destroyabilitypopup @@ -8127,6 +8121,7 @@ BattleScript_CottonDownLoopIncrement: jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop BattleScript_CottonDownReturn: swapattackerwithtarget + copybyte gBattlerAttacker, sSAVED_BATTLER return BattleScript_AnticipationActivates:: diff --git a/docs/changelogs/1.7.1.md b/docs/changelogs/1.7.1.md new file mode 100644 index 0000000000..c30c77512f --- /dev/null +++ b/docs/changelogs/1.7.1.md @@ -0,0 +1,63 @@ +# Version 1.7.1 + +```md +## How to update +- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`. +- Once you have your remote set up, run the command `git pull RHH expansion/1.7.1`. +``` + +## 🧬 General 🧬 +### Changed +* Deprecate agbcc and clarify gcc version usage in install instructions. by @GraionDilach in https://github.com/rh-hideout/pokeemerald-expansion/pull/3788 +### Fixed +* Fix Update Message Saying 1.6.2 by @kaicardenas2 in https://github.com/rh-hideout/pokeemerald-expansion/pull/3759 +* Fix exp gain when defeating two opponents at once by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/3798 +* Fix debug menu toggling first flag by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3796 + +## 🐉 Pokémon 🐉 +### Fixed +* Fix Maushold-3 and Maushold-4 icons being swapped by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/3809 +* Fixes Minior form change and likely other forms by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/3822 +* Fix P_FAMILY #if blocks for Regigigas and Giratina in front_pic_anims.h by @gabrielcowley in https://github.com/rh-hideout/pokeemerald-expansion/pull/3823 + +## 🤹 Moves 🤹 +### Added +* Adds data for The Indigo Disk moves by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/3852 + * Many moves still have placeholder effects. +### Fixed +* Fix Telekinesis not working by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3763 +* Fix Ion Deluge interaction with Volt Absorb andLightning Rod by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3764 +* Fix Max Moves animations by @GraionDilach in https://github.com/rh-hideout/pokeemerald-expansion/pull/3769 +* Fix Cotton Down overwriting gBattlerAttacker by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/3783 +* Fix Photon Geyser by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/3803 and https://github.com/rh-hideout/pokeemerald-expansion/pull/3807 +* Fix Metronome crash by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/3852 + +## 🎭 Abilities 🎭 +### Fixed +* Fix Ice Face ignoring move effects by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3755 +* Fix Frisk ability pop-up showing wrong battler by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3762 +* Prankster tests + fixes by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3766 + +## 🧶 Items 🧶 +### Fixed +* Fixes Item Metronome damage by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/3767 +* Fix gem boost description + test by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/3817 + +## 🧹 Cleanup 🧹 +* Clear BattleScripting struct at the battle start by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3776 +* Fix Rain Dance and Sunny Day not blending opponent sprite by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3785 +* Same lists for healing moves by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3787 +* [battle_controller_player.c] refactor and fix buffer overread by @SBird1337 in https://github.com/rh-hideout/pokeemerald-expansion/pull/3792 +* Make overworld weather-based terrain setting effects use B_MSG_TERRAIN_SET constants for intro text by @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/3793 +* Clear Sky Battle & Dynamax flags upon whiteout by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/3830 + +## 🧪 Test Runner 🧪 +### Added +* Small test runner improvements by @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/3761 +* EXPECT_MUL_EQ thresholds are always at least ±1 by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/3768 +* Added last CannotUseItemsInBattle tests by @LOuroboros in https://github.com/rh-hideout/pokeemerald-expansion/pull/3789 + +## New Contributors +* @kaicardenas2 made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/3759 + +**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.7.0...expansion/1.7.1 diff --git a/graphics/pokemon/maushold/four/icon.png b/graphics/pokemon/maushold/four/icon.png index 728aca58a1..97c2d70826 100755 Binary files a/graphics/pokemon/maushold/four/icon.png and b/graphics/pokemon/maushold/four/icon.png differ diff --git a/graphics/pokemon/maushold/icon.png b/graphics/pokemon/maushold/icon.png index 97c2d70826..728aca58a1 100755 Binary files a/graphics/pokemon/maushold/icon.png and b/graphics/pokemon/maushold/icon.png differ diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index f8a5a01cc1..bfb51d67bd 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -118,7 +118,7 @@ bool32 ShouldSetSnow(u32 battler, u32 ability, u32 holdEffect); bool32 ShouldSetRain(u32 battlerAtk, u32 ability, u32 holdEffect); bool32 ShouldSetSun(u32 battlerAtk, u32 atkAbility, u32 holdEffect); bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef); -bool32 IsHealingMoveEffect(u32 effect); +bool32 IsHealingMove(u32 move); bool32 HasHealingEffect(u32 battler); bool32 IsTrappingMoveEffect(u32 effect); bool32 HasTrappingMoveEffect(u32 battler); diff --git a/include/config/battle.h b/include/config/battle.h index 5f2b8e29ff..acce0ac124 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -109,8 +109,8 @@ #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. #define B_TRANSFORM_SHINY GEN_LATEST // In Gen4+, Transform will copy the shiny state of the opponent instead of maintaining its own shiny state. #define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. -#define B_WIDE_GUARD GEN_LATEST // In Gen5 only, Quick Guard has a chance to fail if used consecutively. -#define B_QUICK_GUARD GEN_LATEST // In Gen5 only, Wide Guard has a chance to fail if used consecutively. +#define B_WIDE_GUARD GEN_LATEST // In Gen5 only, Wide Guard has a chance to fail if used consecutively. +#define B_QUICK_GUARD GEN_LATEST // In Gen5 only, Quick Guard has a chance to fail if used consecutively. #define B_IMPRISON GEN_LATEST // In Gen5+, Imprison doesn't fail if opposing pokemon don't have any moves the user knows. #define B_ALLY_SWITCH_FAIL_CHANCE GEN_LATEST // In Gen9, using Ally Switch consecutively decreases the chance of success for each consecutive use. #define B_SKETCH_BANS GEN_LATEST // In Gen9+, Sketch is unable to copy more moves than in previous generations. diff --git a/include/config/item.h b/include/config/item.h index 4ab75611cb..78324affea 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -10,7 +10,7 @@ #define I_VITAMIN_EV_CAP GEN_LATEST // In Gen8+, the Vitamins no longer have a cap of 100 EV per stat. #define I_BERRY_EV_JUMP GEN_LATEST // In Gen4 only, EV-lowering Berries lower a stat's EV to 100 if it is above 100. #define I_GRISEOUS_ORB_FORM_CHANGE GEN_LATEST // In Gen9+, the Griseous Orb no longer changes Giratina's form when held. -#define I_GEM_BOOST_POWER GEN_LATEST // In Gen5+, the Gem boost power was reduced from 50% to 30%. +#define I_GEM_BOOST_POWER GEN_LATEST // In Gen6+, the Gem boost power was reduced from 50% to 30%. #define I_USE_EVO_HELD_ITEMS_FROM_BAG FALSE // If TRUE, items such as Razor Claw or Electirizer will be usable from the bag to evolve a Pokémon just like in LA. #define I_TYPE_BOOST_POWER GEN_LATEST // In Gen4+, all regular type boosting held items had their power increased from 10% to 20%. eg. Charcoal #define I_SELL_VALUE_FRACTION GEN_LATEST // In Gen9+, items sell for 1/4 of their value instead of 1/2. diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 76e68b2457..ddd7b37843 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -642,5 +642,8 @@ #define F_PAL_ADJACENT (F_PAL_DEF_SIDE | F_PAL_ATK_PARTNER) #define F_PAL_ALL_BUT_DEF (F_PAL_ATK_SIDE | F_PAL_DEF_PARTNER) #define F_PAL_ALL_BUT_ATK_PARTNER (F_PAL_ATTACKER | F_PAL_DEF_SIDE) +// The below are only used by AnimTask_BlendBattleAnimPal to get battler sprite palettes by position rather than by role. +// It's redundant with F_PAL_BATTLERS, because they're only ever used together to refer to all the battlers at once. +#define F_PAL_BATTLERS_2 (1 << 7 | 1 << 8 | 1 << 9 | 1 << 10) #endif // GUARD_CONSTANTS_BATTLE_ANIM_H diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 4899d37036..95632f09c7 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -210,37 +210,36 @@ #define VARIOUS_JUMP_IF_WEATHER_AFFECTED 118 #define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 119 #define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 120 -#define VARIOUS_PHOTON_GEYSER_CHECK 121 -#define VARIOUS_SHELL_SIDE_ARM_CHECK 122 -#define VARIOUS_TRY_NO_RETREAT 123 -#define VARIOUS_TRY_TAR_SHOT 124 -#define VARIOUS_CAN_TAR_SHOT_WORK 125 -#define VARIOUS_CHECK_POLTERGEIST 126 -#define VARIOUS_CUT_1_3_HP_RAISE_STATS 127 -#define VARIOUS_TRY_END_NEUTRALIZING_GAS 128 -#define VARIOUS_JUMP_IF_UNDER_200 129 -#define VARIOUS_SET_SKY_DROP 130 -#define VARIOUS_CLEAR_SKY_DROP 131 -#define VARIOUS_SKY_DROP_YAWN 132 -#define VARIOUS_JUMP_IF_HOLD_EFFECT 133 -#define VARIOUS_CURE_CERTAIN_STATUSES 134 -#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 135 -#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 136 -#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 137 -#define VARIOUS_SAVE_BATTLER_ITEM 138 -#define VARIOUS_RESTORE_BATTLER_ITEM 139 -#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 140 -#define VARIOUS_SET_BEAK_BLAST 141 -#define VARIOUS_SWAP_SIDE_STATUSES 142 -#define VARIOUS_SWAP_STATS 143 -#define VARIOUS_TEATIME_INVUL 144 -#define VARIOUS_TEATIME_TARGETS 145 -#define VARIOUS_TRY_WIND_RIDER_POWER 146 -#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 147 -#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 148 -#define VARIOUS_STORE_HEALING_WISH 149 -#define VARIOUS_HIT_SWITCH_TARGET_FAILED 150 -#define VARIOUS_TRY_REVIVAL_BLESSING 151 +#define VARIOUS_SHELL_SIDE_ARM_CHECK 121 +#define VARIOUS_TRY_NO_RETREAT 122 +#define VARIOUS_TRY_TAR_SHOT 123 +#define VARIOUS_CAN_TAR_SHOT_WORK 124 +#define VARIOUS_CHECK_POLTERGEIST 125 +#define VARIOUS_CUT_1_3_HP_RAISE_STATS 126 +#define VARIOUS_TRY_END_NEUTRALIZING_GAS 127 +#define VARIOUS_JUMP_IF_UNDER_200 128 +#define VARIOUS_SET_SKY_DROP 129 +#define VARIOUS_CLEAR_SKY_DROP 130 +#define VARIOUS_SKY_DROP_YAWN 131 +#define VARIOUS_JUMP_IF_HOLD_EFFECT 132 +#define VARIOUS_CURE_CERTAIN_STATUSES 133 +#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 134 +#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 135 +#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 136 +#define VARIOUS_SAVE_BATTLER_ITEM 137 +#define VARIOUS_RESTORE_BATTLER_ITEM 138 +#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 139 +#define VARIOUS_SET_BEAK_BLAST 140 +#define VARIOUS_SWAP_SIDE_STATUSES 141 +#define VARIOUS_SWAP_STATS 142 +#define VARIOUS_TEATIME_INVUL 143 +#define VARIOUS_TEATIME_TARGETS 144 +#define VARIOUS_TRY_WIND_RIDER_POWER 145 +#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 146 +#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 147 +#define VARIOUS_STORE_HEALING_WISH 148 +#define VARIOUS_HIT_SWITCH_TARGET_FAILED 149 +#define VARIOUS_TRY_REVIVAL_BLESSING 150 // Cmd_manipulatedamage #define DMG_CHANGE_SIGN 0 diff --git a/include/constants/expansion.h b/include/constants/expansion.h index 872e5bbd34..020a76664c 100644 --- a/include/constants/expansion.h +++ b/include/constants/expansion.h @@ -3,7 +3,7 @@ #define EXPANSION_VERSION_MAJOR 1 #define EXPANSION_VERSION_MINOR 7 -#define EXPANSION_VERSION_PATCH 0 +#define EXPANSION_VERSION_PATCH 1 // FALSE if this this version of Expansion is not a tagged commit, i.e. // it contains unreleased changes. diff --git a/ld_script_test.ld b/ld_script_test.ld index b86302f8cb..49a0ec35b0 100644 --- a/ld_script_test.ld +++ b/ld_script_test.ld @@ -109,6 +109,12 @@ SECTIONS { __rom_end = .; + dacs 0x9FFC000 : + ALIGN(4) + { + test/*.o(.dacs); + } > ROM =0 + /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 25b0b96414..b71270a138 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -4740,7 +4740,7 @@ static s32 AI_CheckViability(u32 battlerAtk, u32 battlerDef, u32 move, s32 score ADJUST_SCORE(3); break; case EFFECT_HEAL_BLOCK: - if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER && predictedMove != MOVE_NONE && IsHealingMoveEffect(gBattleMoves[predictedMove].effect)) + if (AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER && predictedMove != MOVE_NONE && IsHealingMove(predictedMove)) ADJUST_SCORE(3); // Try to cancel healing move else if (HasHealingEffect(battlerDef) || aiData->holdEffects[battlerDef] == HOLD_EFFECT_LEFTOVERS || (aiData->holdEffects[battlerDef] == HOLD_EFFECT_BLACK_SLUDGE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_POISON))) diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index e11700dba9..aa994689e5 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -710,11 +710,14 @@ s32 AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, u8 *typeEffectivenes gBattleStruct->zmove.baseMoves[battlerAtk] = move; gBattleStruct->zmove.active = TRUE; } + else if (gBattleMoves[move].effect == EFFECT_PHOTON_GEYSER) + gBattleStruct->swapDamageCategory = (GetCategoryBasedOnStats(gBattlerAttacker) == BATTLE_CATEGORY_PHYSICAL); + + if (gBattleMoves[move].effect == EFFECT_NATURE_POWER) + move = GetNaturePowerMove(); gBattleStruct->dynamicMoveType = 0; - if (move == MOVE_NATURE_POWER) - move = GetNaturePowerMove(); SetTypeBeforeUsingMove(move, battlerAtk); GET_MOVE_TYPE(move, moveType); @@ -826,6 +829,7 @@ s32 AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, u8 *typeEffectivenes // convert multiper to AI_EFFECTIVENESS_xX *typeEffectiveness = AI_GetEffectiveness(effectivenessMultiplier); + gBattleStruct->swapDamageCategory = FALSE; gBattleStruct->zmove.active = FALSE; gBattleStruct->zmove.baseMoves[battlerAtk] = MOVE_NONE; return dmg; @@ -2030,28 +2034,9 @@ bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef) return FALSE; } -bool32 IsHealingMoveEffect(u32 effect) +bool32 IsHealingMove(u32 move) { - switch (effect) - { - case EFFECT_RESTORE_HP: - case EFFECT_MORNING_SUN: - case EFFECT_SYNTHESIS: - case EFFECT_MOONLIGHT: - case EFFECT_SOFTBOILED: - case EFFECT_ROOST: - case EFFECT_SWALLOW: - case EFFECT_WISH: - case EFFECT_HEALING_WISH: - case EFFECT_HEAL_PULSE: - case EFFECT_REST: - case EFFECT_JUNGLE_HEALING: - case EFFECT_ABSORB: - case EFFECT_DREAM_EATER: - return TRUE; - default: - return FALSE; - } + return gBattleMoves[move].healBlockBanned; } bool32 HasHealingEffect(u32 battlerId) @@ -2061,7 +2046,7 @@ bool32 HasHealingEffect(u32 battlerId) for (i = 0; i < MAX_MON_MOVES; i++) { - if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && IsHealingMoveEffect(gBattleMoves[moves[i]].effect)) + if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && IsHealingMove(moves[i])) return TRUE; } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 10f0951950..6d34badfd0 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -226,16 +226,16 @@ static u16 GetPrevBall(u16 ballId) return gBagPockets[BALLS_POCKET].itemSlots[i].itemId; } -static u16 GetNextBall(u16 ballId) +static u32 GetNextBall(u32 ballId) { - u16 ballNext = 0; + u32 ballNext = ITEM_NONE; s32 i; CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]); - for (i = 0; i < gBagPockets[BALLS_POCKET].capacity; i++) + for (i = 1; i < gBagPockets[BALLS_POCKET].capacity; i++) { - if (ballId == gBagPockets[BALLS_POCKET].itemSlots[i].itemId) + if (ballId == gBagPockets[BALLS_POCKET].itemSlots[i-1].itemId) { - ballNext = gBagPockets[BALLS_POCKET].itemSlots[i+1].itemId; + ballNext = gBagPockets[BALLS_POCKET].itemSlots[i].itemId; break; } } diff --git a/src/battle_dome.c b/src/battle_dome.c index d098d1cae7..8823b80565 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -3928,12 +3928,12 @@ static u8 Task_GetInfoCardInput(u8 taskId) #undef tUsingAlternateSlot -static bool32 IsDomeHealingMoveEffect(u32 effect) +static bool32 IsDomeHealingMove(u32 move) { - if (IsHealingMoveEffect(effect)) + if (IsHealingMove(move)) return TRUE; // Check extra effects not considered plain healing by AI - switch(effect) + switch (gBattleMoves[move].effect) { case EFFECT_INGRAIN: case EFFECT_REFRESH: @@ -4360,7 +4360,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) allocatedArray[k] = IsDomeRareMove(move) ? 1 : 0; break; case MOVE_POINTS_HEAL: - allocatedArray[k] = IsDomeHealingMoveEffect(gBattleMoves[move].effect) ? 1 : 0; + allocatedArray[k] = IsDomeHealingMove(move) ? 1 : 0; break; case MOVE_POINTS_RISKY: allocatedArray[k] = IsDomeRiskyMoveEffect(gBattleMoves[move].effect) ? 1 : 0; diff --git a/src/battle_main.c b/src/battle_main.c index 944a386861..e47fdd4209 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4727,7 +4727,7 @@ s8 GetMovePriority(u32 battler, u16 move) { priority++; } - else if (ability == ABILITY_TRIAGE && IsHealingMoveEffect(gBattleMoves[move].effect)) + else if (ability == ABILITY_TRIAGE && IsHealingMove(move)) priority += 3; if (gProtectStructs[battler].quash) diff --git a/src/battle_message.c b/src/battle_message.c index 7d2c60d67a..c0462846d3 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -304,7 +304,7 @@ static const u8 sText_PkmnsXPreventsYLoss[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} static const u8 sText_PkmnsXInfatuatedY[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\ninfatuated {B_ATK_NAME_WITH_PREFIX}!"); static const u8 sText_PkmnsXMadeYIneffective[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nmade {B_CURRENT_MOVE} ineffective!"); static const u8 sText_PkmnsXCuredYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); -static const u8 sText_ItSuckedLiquidOoze[] = _("It sucked up the\nLIQUID OOZE!"); +static const u8 sText_ItSuckedLiquidOoze[] = _("It sucked up the\nliquid ooze!"); static const u8 sText_PkmnTransformed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} transformed!"); static const u8 sText_PkmnsXTookAttack[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\ntook the attack!"); const u8 gText_PkmnsXPreventsSwitching[] = _("{B_BUFF1}'s {B_LAST_ABILITY}\nprevents switching!\p"); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 91fcfd4aee..77bbbe6ea2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6115,6 +6115,7 @@ static void Cmd_moveend(void) gBattleStruct->zmove.effect = EFFECT_HIT; gBattleStruct->hitSwitchTargetFailed = FALSE; gBattleStruct->isAtkCancelerForCalledMove = FALSE; + gBattleStruct->swapDamageCategory = FALSE; gBattleStruct->enduredDamage = 0; gBattleScripting.moveendState++; break; @@ -10250,12 +10251,6 @@ static void Cmd_various(void) gBattlescriptCurrInstr = cmd->nextInstr; return; } - case VARIOUS_PHOTON_GEYSER_CHECK: - { - VARIOUS_ARGS(); - gBattleStruct->swapDamageCategory = (GetCategoryBasedOnStats(battler) == BATTLE_CATEGORY_SPECIAL); - break; - } case VARIOUS_SHELL_SIDE_ARM_CHECK: // 0% chance GameFreak actually checks this way according to DaWobblefet, but this is the only functional explanation at the moment { VARIOUS_ARGS(); @@ -16575,3 +16570,10 @@ void BS_AllySwitchFailChance(void) } gBattlescriptCurrInstr = cmd->nextInstr; } + +void BS_SetPhotonGeyserCategory(void) +{ + NATIVE_ARGS(); + gBattleStruct->swapDamageCategory = (GetCategoryBasedOnStats(gBattlerAttacker) == BATTLE_CATEGORY_PHYSICAL); + gBattlescriptCurrInstr = cmd->nextInstr; +} diff --git a/src/battle_util.c b/src/battle_util.c index fa34fc7460..c3a020ace6 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3429,7 +3429,8 @@ bool32 HandleFaintedMonActions(void) && gCurrentTurnActionNumber != gBattlersCount) { gAbsentBattlerFlags |= gBitTable[gBattlerFainted]; - return FALSE; + if (gBattleStruct->faintedActionsState != 1) + return FALSE; } break; case 3: @@ -4368,7 +4369,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 { // overworld weather started rain, so just do electric terrain anim gFieldStatuses = (STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_TERRAIN_PERMANENT); - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAIN_SET_ELECTRIC; BattleScriptPushCursorAndCallback(BattleScript_OverworldTerrain); effect++; } @@ -4377,7 +4378,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 && !(gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN)) { gFieldStatuses = (STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_TERRAIN_PERMANENT); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TERRAIN_SET_MISTY; BattleScriptPushCursorAndCallback(BattleScript_OverworldTerrain); effect++; } @@ -4792,6 +4793,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 case ABILITY_SHIELDS_DOWN: if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_HP_PERCENT)) { + gBattlerAttacker = battler; BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3); effect++; } @@ -5117,6 +5119,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 case ABILITY_POWER_CONSTRUCT: if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_HP_PERCENT)) { + gBattlerAttacker = battler; BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3); effect++; } @@ -5138,6 +5141,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 case ABILITY_HUNGER_SWITCH: if (TryBattleFormChange(battler, FORM_CHANGE_BATTLE_TURN_END)) { + gBattlerAttacker = battler; BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); effect++; } diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 4e26d9e4b3..94fec5691a 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11310,7 +11310,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 0, - .target = MOVE_TARGET_FOES_AND_ALLY, + .target = MOVE_TARGET_SELECTED, .priority = 0, .category = BATTLE_CATEGORY_SPECIAL, .ignoresTargetAbility = TRUE, diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 2c7401059e..e129d9505a 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -626,6 +626,9 @@ const u8 *const gItemEffectTable[ITEMS_COUNT] = [ITEM_BLACK_AUGURITE] = gItemEffect_EvoItem, [ITEM_LINKING_CORD] = gItemEffect_EvoItem, [ITEM_PEAT_BLOCK] = gItemEffect_EvoItem, + [ITEM_SYRUPY_APPLE] = gItemEffect_EvoItem, + [ITEM_UNREMARKABLE_TEACUP] = gItemEffect_EvoItem, + [ITEM_MASTERPIECE_TEACUP] = gItemEffect_EvoItem, // Berries [ITEM_CHERI_BERRY] = gItemEffect_CheriBerry, diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index 92c8c7729c..75cb52732c 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -6127,7 +6127,9 @@ static const union AnimCmd sAnim_Regigigas_1[] = ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; +#endif //P_FAMILY_REGIGIGAS +#if P_FAMILY_GIRATINA static const union AnimCmd sAnim_GiratinaAltered_1[] = { ANIMCMD_FRAME(0, 12), @@ -6145,7 +6147,7 @@ static const union AnimCmd sAnim_GiratinaOrigin_1[] = ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -#endif //P_FAMILY_REGIGIGAS +#endif //P_FAMILY_GIRATINA #if P_FAMILY_CRESSELIA static const union AnimCmd sAnim_Cresselia_1[] = diff --git a/src/debug.c b/src/debug.c index 35b4a6432f..46655625b8 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1437,6 +1437,7 @@ static void DebugTask_HandleMenuInput_FlagsVars(u8 taskId) PlaySE(SE_SELECT); if ((func = sDebugMenu_Actions_Flags[input]) != NULL) { + Debug_RedrawListMenu(taskId); func(taskId); // Remove TRUE/FALSE window for functions that haven't been assigned flags @@ -1446,8 +1447,6 @@ static void DebugTask_HandleMenuInput_FlagsVars(u8 taskId) RemoveWindow(gTasks[taskId].tSubWindowId); Free(sDebugMenuListData); } - else - Debug_RedrawListMenu(taskId); } } else if (JOY_NEW(B_BUTTON)) diff --git a/src/overworld.c b/src/overworld.c index 09e242b217..238e21d8d5 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -414,6 +414,8 @@ void Overworld_ResetStateAfterDigEscRope(void) FlagClear(B_SMART_WILD_AI_FLAG); FlagClear(B_FLAG_NO_BAG_USE); FlagClear(B_FLAG_NO_CATCHING); + FlagClear(B_FLAG_DYNAMAX_BATTLE); + FlagClear(B_FLAG_SKY_BATTLE); } #endif diff --git a/test/battle/ability/shields_down.c b/test/battle/ability/shields_down.c new file mode 100644 index 0000000000..d0149e13f9 --- /dev/null +++ b/test/battle/ability/shields_down.c @@ -0,0 +1,34 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Minior Meteor transforms into Minior Core on switch-in if it has 1/2 or less health") +{ + GIVEN { + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_MINIOR_METEOR) { Ability(ABILITY_SHIELDS_DOWN); HP(1); } + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); SEND_OUT(opponent, 1); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent); + } THEN { + EXPECT_EQ(opponent->species, SPECIES_MINIOR_CORE); + } +} + +SINGLE_BATTLE_TEST("Minior Core transforms into Minior Meteor on switch-in if it more then 1/2 health") +{ + GIVEN { + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + OPPONENT(SPECIES_MINIOR_CORE) { Ability(ABILITY_SHIELDS_DOWN); } + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); SEND_OUT(opponent, 1); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_SHIELDS_DOWN); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, opponent); + } THEN { + EXPECT_EQ(opponent->species, SPECIES_MINIOR_METEOR); + } +} diff --git a/test/battle/hold_effect/gems.c b/test/battle/hold_effect/gems.c index c98718313d..c4ef15a0f1 100644 --- a/test/battle/hold_effect/gems.c +++ b/test/battle/hold_effect/gems.c @@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Gem boost is only applied once") s16 normalHit; GIVEN { - ASSUME(I_GEM_BOOST_POWER >= GEN_5); + ASSUME(I_GEM_BOOST_POWER >= GEN_6); PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_NORMAL_GEM); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/item_effect/escape.c b/test/battle/item_effect/escape.c new file mode 100644 index 0000000000..0947a4ff9a --- /dev/null +++ b/test/battle/item_effect/escape.c @@ -0,0 +1,50 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gItems[ITEM_POKE_TOY].battleUsage == EFFECT_ITEM_ESCAPE); +} + +WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { USE_ITEM(player, ITEM_POKE_TOY); } + } SCENE { + MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p"); + } +} + +WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle even if a move forbid them to") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_MEAN_LOOK].effect == EFFECT_MEAN_LOOK); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_MEAN_LOOK); } + TURN { USE_ITEM(player, ITEM_POKE_TOY); } + } SCENE { + // Turn 1 + MESSAGE("Wild Wobbuffet used Mean Look!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MEAN_LOOK, opponent); + MESSAGE("Wobbuffet can't escape now!"); + // Turn 2 + MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p"); + } +} + +WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle even if an ability forbid them to") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_DIGLETT) { Ability(ABILITY_ARENA_TRAP); } + } WHEN { + TURN { USE_ITEM(player, ITEM_POKE_TOY); } + } SCENE { + MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p"); + } +} diff --git a/test/battle/item_effect/restore_pp.c b/test/battle/item_effect/restore_pp.c index e998ef3d98..ef621ca0f2 100644 --- a/test/battle/item_effect/restore_pp.c +++ b/test/battle/item_effect/restore_pp.c @@ -64,3 +64,5 @@ SINGLE_BATTLE_TEST("Max Elixir restores the PP of all of a battler's moves fully EXPECT_EQ(player->pp[3], 40); } } + +TO_DO_BATTLE_TEST("Ether won't work if the selected move has all its PP") diff --git a/test/battle/item_effect/revive.c b/test/battle/item_effect/revive.c index 2be2ac4a61..45c57322e8 100644 --- a/test/battle/item_effect/revive.c +++ b/test/battle/item_effect/revive.c @@ -72,3 +72,5 @@ SINGLE_BATTLE_TEST("Max Honey restores a fainted battler's HP fully") EXPECT_EQ(player->hp, 200); } } + +TO_DO_BATTLE_TEST("Revive won't restore a battler's HP if it hasn't fainted") diff --git a/test/battle/item_effect/throw_ball.c b/test/battle/item_effect/throw_ball.c new file mode 100644 index 0000000000..17ba01db50 --- /dev/null +++ b/test/battle/item_effect/throw_ball.c @@ -0,0 +1,7 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Poke Balls can't be thrown when there's 2 opposing wild battlers") +TO_DO_BATTLE_TEST("Poke Balls can't be thrown when there's no space in the Pokemon Storage System") +TO_DO_BATTLE_TEST("Poke Balls can't be thrown when an opposing wild battler is in a semi-invulnerable state") +TO_DO_BATTLE_TEST("Poke Balls can't be thrown when B_FLAG_NO_CATCHING is set") diff --git a/test/battle/move_effect/photon_geyser.c b/test/battle/move_effect/photon_geyser.c new file mode 100644 index 0000000000..4171264a1a --- /dev/null +++ b/test/battle/move_effect/photon_geyser.c @@ -0,0 +1,51 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_PHOTON_GEYSER].effect == EFFECT_PHOTON_GEYSER); +} + +SINGLE_BATTLE_TEST("Photon Geyser can be mirror coated if it is a special move") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Attack(100); SpAttack(110); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PHOTON_GEYSER); MOVE(opponent, MOVE_MIRROR_COAT); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_PHOTON_GEYSER, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_MIRROR_COAT, opponent); + HP_BAR(player); + } +} + +SINGLE_BATTLE_TEST("Photon Geyser can be countered if it is a physcal move") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Attack(110); SpAttack(100); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_PHOTON_GEYSER); MOVE(opponent, MOVE_COUNTER); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_PHOTON_GEYSER, player); + HP_BAR(opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_COUNTER, opponent); + HP_BAR(player); + } +} + +SINGLE_BATTLE_TEST("Photon Geyser ignores ignorable Abilities like Battle Armor") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_LAPRAS) { Ability(ABILITY_SHELL_ARMOR); } + } WHEN { + TURN { MOVE(player, MOVE_PHOTON_GEYSER, criticalHit: TRUE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_PHOTON_GEYSER, player, ); + HP_BAR(opponent); + MESSAGE("A critical hit!"); + } +} diff --git a/test/battle/move_effect/strength_sap.c b/test/battle/move_effect/strength_sap.c index c549e4c332..d8e0b6e74b 100644 --- a/test/battle/move_effect/strength_sap.c +++ b/test/battle/move_effect/strength_sap.c @@ -57,3 +57,142 @@ SINGLE_BATTLE_TEST("Strength Sap works exactly the same when attacker is behind EXPECT_EQ(results[i].hp * -1, atkStat); } } + +// This test checks all stat stages from -6 to +6. +SINGLE_BATTLE_TEST("Strength Sap lowers Attack by 1 and restores HP based on target's Attack Stat and stat Change", s16 hp) +{ + s32 j = 0, statStage = 0; + + for (j = 0; j <= MAX_STAT_STAGE; j++) { + if (j == DEFAULT_STAT_STAGE - 1) { continue; } // Ignore -6, because Strength Sap won't work otherwise + PARAMETRIZE{ statStage = j; } + } + + GIVEN { + ASSUME(gBattleMoves[MOVE_WORK_UP].effect == EFFECT_ATTACK_SPATK_UP); + ASSUME(gBattleMoves[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); + PLAYER(SPECIES_WOBBUFFET) { HP(50); } + OPPONENT(SPECIES_WOBBUFFET) { Attack(60); } + } WHEN { + if (statStage > DEFAULT_STAT_STAGE) { // + + for (j = statStage; j > DEFAULT_STAT_STAGE; j--) { + TURN { MOVE(opponent, MOVE_HOWL); } + } + } else if (statStage < DEFAULT_STAT_STAGE) { // - + for (j = statStage; j < DEFAULT_STAT_STAGE - 1; j++) { // - 1 because Strength Sap always lowers Attack + TURN { MOVE(player, MOVE_GROWL); } + } + } + TURN { MOVE(player, MOVE_STRENGTH_SAP); } + } SCENE { + if (statStage > DEFAULT_STAT_STAGE) { // + + for (j = statStage; j > DEFAULT_STAT_STAGE; j--) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, opponent); + } + } else if (statStage < DEFAULT_STAT_STAGE) { // - + for (j = statStage; j < DEFAULT_STAT_STAGE - 1; j++) { + ANIMATION(ANIM_TYPE_MOVE, MOVE_GROWL, player); + } + } + MESSAGE("Wobbuffet used Strength Sap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_STRENGTH_SAP, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's Attack fell!"); + HP_BAR(player, captureDamage: &results[i].hp); + MESSAGE("Foe Wobbuffet had its energy drained!"); + } THEN { + if (statStage < DEFAULT_STAT_STAGE) { + EXPECT_EQ(results[i].hp * -1, (60 * gStatStageRatios[statStage + 1][0] / gStatStageRatios[statStage + 1][1])); + } else { + EXPECT_EQ(results[i].hp * -1, (60 * gStatStageRatios[statStage][0] / gStatStageRatios[statStage][1])); + } + } FINALLY { + // This makes sure gStatStageRatios works correctly and the lower the attack stage the lower hp obtained. + for (j = 0; j < MAX_STAT_STAGE - 1; j++) { + EXPECT_GT(abs(results[j + 1].hp), abs(results[j].hp)); + } + } +} + +SINGLE_BATTLE_TEST("Strength Sap fails if target is at -6 Atk") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_CHARM].effect == EFFECT_ATTACK_DOWN_2); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CHARM); } + TURN { MOVE(player, MOVE_CHARM); } + TURN { MOVE(player, MOVE_CHARM); } + TURN { MOVE(player, MOVE_STRENGTH_SAP); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_CHARM, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CHARM, player); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CHARM, player); + MESSAGE("Wobbuffet used Strength Sap!"); + NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, MOVE_STRENGTH_SAP, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's Attack fell!"); + HP_BAR(player); + MESSAGE("Foe Wobbuffet had its energy drained!"); + } + MESSAGE("Foe Wobbuffet's Attack won't go lower!"); + } +} + +SINGLE_BATTLE_TEST("Strength Sap restores more HP if Big Root is held", s16 hp) +{ + u32 item; + + PARAMETRIZE { item = ITEM_NONE; } + PARAMETRIZE { item = ITEM_BIG_ROOT; } + + GIVEN { + ASSUME(gItems[ITEM_BIG_ROOT].holdEffect == HOLD_EFFECT_BIG_ROOT); + PLAYER(SPECIES_WOBBUFFET) { HP(200); Item(item); } + OPPONENT(SPECIES_WOBBUFFET) { Attack(100); } + } WHEN { + TURN { MOVE(player, MOVE_STRENGTH_SAP); } + } SCENE { + MESSAGE("Wobbuffet used Strength Sap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_STRENGTH_SAP, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's Attack fell!"); + HP_BAR(player, captureDamage: &results[i].hp); + MESSAGE("Foe Wobbuffet had its energy drained!"); + } FINALLY { + EXPECT_GT(abs(results[1].hp), abs(results[0].hp)); + } +} + +SINGLE_BATTLE_TEST("Strength Sap makes attacker lose HP if target's ability is Liquid Ooze") +{ + s16 lostHp; + s32 atkStat; + + PARAMETRIZE { atkStat = 100; } + PARAMETRIZE { atkStat = 490; } // Checks that attacker can faint with no problems. + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { Attack(atkStat); Ability(ABILITY_LIQUID_OOZE); } + } WHEN { + TURN { MOVE(player, MOVE_STRENGTH_SAP); if (atkStat == 490) { SEND_OUT(player, 1); } } + } SCENE { + MESSAGE("Wobbuffet used Strength Sap!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_STRENGTH_SAP, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + MESSAGE("Foe Wobbuffet's Attack fell!"); + ABILITY_POPUP(opponent, ABILITY_LIQUID_OOZE); + HP_BAR(player, captureDamage: &lostHp); + MESSAGE("It sucked up the liquid ooze!"); + if (atkStat >= 490) { + MESSAGE("Wobbuffet fainted!"); + MESSAGE("Go! Wobbuffet!"); + } + } THEN { + EXPECT_EQ(lostHp, atkStat); + } +} diff --git a/test/test_runner.c b/test/test_runner.c index 577ea1dbc1..72ce5cf665 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -106,6 +106,8 @@ static u32 AssignCostToRunner(void) void CB2_TestRunner(void) { +top: + switch (gTestRunnerState.state) { case STATE_INIT: @@ -361,6 +363,9 @@ void CB2_TestRunner(void) MgbaExit_(gTestRunnerState.exitCode); break; } + + if (gMain.callback2 == CB2_TestRunner) + goto top; } void Test_ExpectedResult(enum TestResult result) @@ -662,3 +667,25 @@ static s32 MgbaVPrintf_(const char *fmt, va_list va) } return i; } + +/* Entry point for the Debugging and Control System. Handles illegal + * instructions, which are typically caused by branching to an invalid + * address. */ +__attribute__((naked, section(".dacs"), target("arm"))) +void DACSEntry(void) +{ + asm(".arm\n\ + ldr r0, =(DACSHandle + 1)\n\ + bx r0\n"); +} + +#define DACS_LR (*(vu32 *)0x3007FEC) + +void DACSHandle(void) +{ + if (gTestRunnerState.state == STATE_RUN_TEST) + gTestRunnerState.state = STATE_REPORT_RESULT; + gTestRunnerState.result = TEST_RESULT_CRASH; + ReinitCallbacks(); + DACS_LR = ((uintptr_t)JumpToAgbMainLoop & ~1) + 4; +}