diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 3943be6278..84b94940d9 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -7027,6 +7027,10 @@ HurricaneGust: createsprite gEllipticalGustSpriteTemplate, ANIM_ATTACKER, 2, 0, -16 createvisualtask AnimTask_AnimateGustTornadoPalette, 5, 1, 70 return +HurricaneGustCentered: + createsprite gEllipticalGustCenteredSpriteTemplate, ANIM_ATTACKER, 2, 0, -16 + createvisualtask AnimTask_AnimateGustTornadoPalette, 5, 1, 70 + return Move_HEAD_CHARGE: loadspritegfx ANIM_TAG_IMPACT @@ -15920,36 +15924,36 @@ Move_SPRINGTIDE_STORM:: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_RED_HEART playsewithpan SE_M_GUST, SOUND_PAN_TARGET - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 4, 88, 1 - createvisualtask AnimTask_BlendColorCycle, 2, F_PAL_TARGET, 2, 6, 0, 11, RGB(31, 22, 30) - call HurricaneGust + createvisualtaskontargets AnimTask_ShakeMon2, 2, 0, ANIM_TARGET, 0, 4, 0x58, 1 + createvisualtask AnimTask_BlendColorCycle, 0x2, F_PAL_TARGET, 0x2, 0x6, 0x0, 0xB, 0x7ADF + call HurricaneGustCentered call SpringtideStormHeartSwirl - call HurricaneGust + call HurricaneGustCentered call SpringtideStormHeartSwirl - call HurricaneGust + call HurricaneGustCentered call SpringtideStormHeartSwirl - call HurricaneGust + call HurricaneGustCentered call SpringtideStormHeartSwirl - call HurricaneGust + call HurricaneGustCentered call SpringtideStormHeartSwirl - call HurricaneGust + call HurricaneGustCentered call SpringtideStormHeartSwirl waitforvisualfinish stopsound end SpringtideStormHeartSwirl: - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET + createspriteontargets gSpriteTemplate_SpringtideHeart, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET return @@ -16490,37 +16494,37 @@ Move_BLEAKWIND_STORM:: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_ICE_CRYSTALS playsewithpan SE_M_GUST, SOUND_PAN_TARGET - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 4, 88, 1 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x7FFF - call HurricaneGust + createvisualtaskontargets AnimTask_ShakeMon2, 2, 0, ANIM_TARGET, 0, 4, 0x58, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x7FFF + call HurricaneGustCentered call BleakwindStormIceSwirl - call HurricaneGust + call HurricaneGustCentered call BleakwindStormIceSwirl - call HurricaneGust + call HurricaneGustCentered call BleakwindStormIceSwirl - call HurricaneGust + call HurricaneGustCentered call BleakwindStormIceSwirl - call HurricaneGust + call HurricaneGustCentered call BleakwindStormIceSwirl - call HurricaneGust + call HurricaneGustCentered call BleakwindStormIceSwirl waitforvisualfinish stopsound - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x7FFF + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x7FFF waitforvisualfinish end BleakwindStormIceSwirl: - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET + createspriteontargets gSpriteTemplate_BleakwindIce, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET return @@ -16533,39 +16537,39 @@ Move_WILDBOLT_STORM:: createvisualtask AnimTask_StartSlidingBg, 0x5, 0xff00, 0x0, 0x1, 0xffff waitbgfadein playsewithpan SE_M_GUST, SOUND_PAN_TARGET - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 4, 88, 1 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x07FE - call HurricaneGust + createvisualtaskontargets AnimTask_ShakeMon2, 2, 0, ANIM_TARGET, 0, 4, 0x58, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x07FE + call HurricaneGustCentered call WildboltStormSparkSwirl - call HurricaneGust + call HurricaneGustCentered call WildboltStormSparkSwirl - call HurricaneGust + call HurricaneGustCentered call WildboltStormSparkSwirl - call HurricaneGust + call HurricaneGustCentered call WildboltStormSparkSwirl - call HurricaneGust + call HurricaneGustCentered call WildboltStormSparkSwirl - call HurricaneGust + call HurricaneGustCentered call WildboltStormSparkSwirl waitforvisualfinish stopsound - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x07FE + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x07FE call UnsetPsychicBg waitforvisualfinish end WildboltStormSparkSwirl: - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x210, 0x1e, 0xa, 0x32, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x24, 0x1e0, 0x14, 0xd, 0xffd2, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x240, 0x14, 0x5, 0x2a, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x23, 0x190, 0x19, 0x8, 0xffd6, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x200, 0x19, 0xd, 0x2e, ANIM_TARGET delay 0x2 - createsprite gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET + createspriteontargets gSpriteTemplate_WildboltStormSpark, ANIM_TARGET, 2, 6, 0x0, 0x25, 0x1d0, 0x1e, 0xc, 0xffce, ANIM_TARGET return @@ -16575,38 +16579,38 @@ Move_SANDSEAR_STORM:: loadspritegfx ANIM_TAG_SMALL_EMBER createvisualtask AnimTask_BlendParticle, 0x5, ANIM_TAG_GUST, 0x0, 0xA, 0xA, 0x190B playsewithpan SE_M_GUST, SOUND_PAN_TARGET - createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 4, 88, 1 - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x1F - call HurricaneGust + createvisualtaskontargets AnimTask_ShakeMon2, 2, 0, ANIM_TARGET, 0, 4, 0x58, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x4, 0x0, 0xB, 0x1F + call HurricaneGustCentered call SandsearStormFireSpin - call HurricaneGust + call HurricaneGustCentered call SandsearStormFireSpin - call HurricaneGust + call HurricaneGustCentered call SandsearStormFireSpin - call HurricaneGust + call HurricaneGustCentered call SandsearStormFireSpin - call HurricaneGust + call HurricaneGustCentered call SandsearStormFireSpin - call HurricaneGust + call HurricaneGustCentered call SandsearStormFireSpin waitforvisualfinish stopsound - createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x1F + createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_TARGET, 0x1, 0xB, 0x0, 0x1F waitforvisualfinish end SandsearStormFireSpin: - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x1c, 0x210, 0x1e, 0xd, 0x32, ANIM_TARGET delay 0x2 - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x20, 0x1e0, 0x14, 0x10, 0xffd2, ANIM_TARGET delay 0x2 - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x21, 0x240, 0x14, 0x8, 0x2a, ANIM_TARGET delay 0x2 - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x1f, 0x190, 0x19, 0xb, 0xffd6, ANIM_TARGET delay 0x2 - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x1c, 0x200, 0x19, 0x10, 0x2e, ANIM_TARGET delay 0x2 - createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_TARGET + createspriteontargets gFireSpinSpriteTemplate, ANIM_TARGET, 2, 6, 0x0, 0x21, 0x1d0, 0x1e, 0xf, 0xffce, ANIM_TARGET return diff --git a/graphics/pokemon/gen_2/togepi/icon.png b/graphics/pokemon/gen_2/togepi/icon.png index eea4a651c3..5fb13ad06b 100644 Binary files a/graphics/pokemon/gen_2/togepi/icon.png and b/graphics/pokemon/gen_2/togepi/icon.png differ diff --git a/graphics/pokemon/gen_3/linoone/anim_front.png b/graphics/pokemon/gen_3/linoone/anim_front.png index f2882dd048..5ec89b95c0 100644 Binary files a/graphics/pokemon/gen_3/linoone/anim_front.png and b/graphics/pokemon/gen_3/linoone/anim_front.png differ diff --git a/graphics/pokemon/gen_3/linoone/back.png b/graphics/pokemon/gen_3/linoone/back.png index c0c30a69d2..1c8f19af26 100644 Binary files a/graphics/pokemon/gen_3/linoone/back.png and b/graphics/pokemon/gen_3/linoone/back.png differ diff --git a/graphics/pokemon/gen_3/linoone/normal.pal b/graphics/pokemon/gen_3/linoone/normal.pal index 4f2dce5d15..11578944ae 100644 --- a/graphics/pokemon/gen_3/linoone/normal.pal +++ b/graphics/pokemon/gen_3/linoone/normal.pal @@ -7,13 +7,13 @@ JASC-PAL 160 136 120 184 160 144 216 200 184 -88 72 56 -24 24 24 +59 48 38 +13 13 13 144 128 120 48 120 152 104 176 216 248 248 248 112 112 112 -0 0 0 +96 79 62 0 0 0 0 0 0 diff --git a/graphics/pokemon/gen_3/linoone/shiny.pal b/graphics/pokemon/gen_3/linoone/shiny.pal index 37008b1e53..367107a3bb 100644 --- a/graphics/pokemon/gen_3/linoone/shiny.pal +++ b/graphics/pokemon/gen_3/linoone/shiny.pal @@ -2,18 +2,18 @@ JASC-PAL 0100 16 152 208 160 -88 72 56 -200 104 48 -216 136 72 -192 160 144 -216 200 176 -152 72 24 +66 49 33 +206 99 33 +222 132 49 +197 165 148 +222 206 181 +156 58 0 24 24 24 152 120 112 216 152 0 248 224 48 248 248 248 112 112 112 -0 0 0 +189 78 13 0 0 0 0 0 0 diff --git a/graphics/pokemon/gen_3/zigzagoon/anim_front.png b/graphics/pokemon/gen_3/zigzagoon/anim_front.png index 54c3de9925..b8db61bc41 100644 Binary files a/graphics/pokemon/gen_3/zigzagoon/anim_front.png and b/graphics/pokemon/gen_3/zigzagoon/anim_front.png differ diff --git a/graphics/pokemon/gen_3/zigzagoon/back.png b/graphics/pokemon/gen_3/zigzagoon/back.png index cefc91e916..e4811fb44f 100644 Binary files a/graphics/pokemon/gen_3/zigzagoon/back.png and b/graphics/pokemon/gen_3/zigzagoon/back.png differ diff --git a/graphics/pokemon/gen_5/krookodile/anim_front.png b/graphics/pokemon/gen_5/krookodile/anim_front.png index 530488b9b2..7b8e76e56d 100644 Binary files a/graphics/pokemon/gen_5/krookodile/anim_front.png and b/graphics/pokemon/gen_5/krookodile/anim_front.png differ diff --git a/graphics/pokemon/gen_5/litwick/anim_front.png b/graphics/pokemon/gen_5/litwick/anim_front.png index 10189cd52b..7de1f01b5d 100644 Binary files a/graphics/pokemon/gen_5/litwick/anim_front.png and b/graphics/pokemon/gen_5/litwick/anim_front.png differ diff --git a/graphics/pokemon/gen_6/tyrantrum/anim_front.png b/graphics/pokemon/gen_6/tyrantrum/anim_front.png index 22f83b3bcb..1031b510f4 100644 Binary files a/graphics/pokemon/gen_6/tyrantrum/anim_front.png and b/graphics/pokemon/gen_6/tyrantrum/anim_front.png differ diff --git a/graphics/pokemon/gen_6/tyrantrum/back.png b/graphics/pokemon/gen_6/tyrantrum/back.png index f857bfbfd1..0500b874af 100644 Binary files a/graphics/pokemon/gen_6/tyrantrum/back.png and b/graphics/pokemon/gen_6/tyrantrum/back.png differ diff --git a/graphics/pokemon/gen_8/duraludon/back.png b/graphics/pokemon/gen_8/duraludon/back.png index 606c884662..7c1ee622f8 100644 Binary files a/graphics/pokemon/gen_8/duraludon/back.png and b/graphics/pokemon/gen_8/duraludon/back.png differ diff --git a/graphics/pokemon/gen_8/duraludon/front.png b/graphics/pokemon/gen_8/duraludon/front.png index 39e39798e9..fd22d471ee 100644 Binary files a/graphics/pokemon/gen_8/duraludon/front.png and b/graphics/pokemon/gen_8/duraludon/front.png differ diff --git a/graphics/pokemon/gen_8/duraludon/normal.pal b/graphics/pokemon/gen_8/duraludon/normal.pal index 3b8dca287f..1324d92ad2 100644 --- a/graphics/pokemon/gen_8/duraludon/normal.pal +++ b/graphics/pokemon/gen_8/duraludon/normal.pal @@ -1,9 +1,9 @@ JASC-PAL 0100 16 -49 93 139 -98 133 172 156 210 164 +98 133 172 +49 93 139 106 52 57 16 16 16 123 129 148 diff --git a/graphics/pokemon/gen_8/duraludon/shiny.pal b/graphics/pokemon/gen_8/duraludon/shiny.pal index 583a51f2a4..19e7323e31 100644 --- a/graphics/pokemon/gen_8/duraludon/shiny.pal +++ b/graphics/pokemon/gen_8/duraludon/shiny.pal @@ -1,9 +1,9 @@ JASC-PAL 0100 16 -67 119 184 -109 151 204 156 210 164 +109 151 204 +67 119 184 112 105 107 16 16 16 81 96 101 diff --git a/graphics/pokemon/gen_9/annihilape/icon.png b/graphics/pokemon/gen_9/annihilape/icon.png index a516d2d5e9..561a4afedd 100644 Binary files a/graphics/pokemon/gen_9/annihilape/icon.png and b/graphics/pokemon/gen_9/annihilape/icon.png differ diff --git a/graphics/pokemon/gen_9/arctibax/icon.png b/graphics/pokemon/gen_9/arctibax/icon.png index f9fcaecf43..cd7aec243e 100644 Binary files a/graphics/pokemon/gen_9/arctibax/icon.png and b/graphics/pokemon/gen_9/arctibax/icon.png differ diff --git a/graphics/pokemon/gen_9/armarouge/icon.png b/graphics/pokemon/gen_9/armarouge/icon.png index a1b9e9b90f..2a348cab51 100644 Binary files a/graphics/pokemon/gen_9/armarouge/icon.png and b/graphics/pokemon/gen_9/armarouge/icon.png differ diff --git a/graphics/pokemon/gen_9/baxcalibur/icon.png b/graphics/pokemon/gen_9/baxcalibur/icon.png index 1aee317d5c..befc75d3c8 100644 Binary files a/graphics/pokemon/gen_9/baxcalibur/icon.png and b/graphics/pokemon/gen_9/baxcalibur/icon.png differ diff --git a/graphics/pokemon/gen_9/bellibolt/icon.png b/graphics/pokemon/gen_9/bellibolt/icon.png index 865c18ad0e..28492e341d 100644 Binary files a/graphics/pokemon/gen_9/bellibolt/icon.png and b/graphics/pokemon/gen_9/bellibolt/icon.png differ diff --git a/graphics/pokemon/gen_9/brambleghast/icon.png b/graphics/pokemon/gen_9/brambleghast/icon.png index e8f273b095..645ed7014d 100644 Binary files a/graphics/pokemon/gen_9/brambleghast/icon.png and b/graphics/pokemon/gen_9/brambleghast/icon.png differ diff --git a/graphics/pokemon/gen_9/bramblin/icon.png b/graphics/pokemon/gen_9/bramblin/icon.png index ff2d15599e..9833e5007b 100644 Binary files a/graphics/pokemon/gen_9/bramblin/icon.png and b/graphics/pokemon/gen_9/bramblin/icon.png differ diff --git a/graphics/pokemon/gen_9/ceruledge/icon.png b/graphics/pokemon/gen_9/ceruledge/icon.png index 7687030bd7..329d5ede31 100644 Binary files a/graphics/pokemon/gen_9/ceruledge/icon.png and b/graphics/pokemon/gen_9/ceruledge/icon.png differ diff --git a/graphics/pokemon/gen_9/cetitan/icon.png b/graphics/pokemon/gen_9/cetitan/icon.png index 81cf0a3e24..2a0db87041 100644 Binary files a/graphics/pokemon/gen_9/cetitan/icon.png and b/graphics/pokemon/gen_9/cetitan/icon.png differ diff --git a/graphics/pokemon/gen_9/cetoddle/icon.png b/graphics/pokemon/gen_9/cetoddle/icon.png index 330b5c56d2..b123bf1f81 100644 Binary files a/graphics/pokemon/gen_9/cetoddle/icon.png and b/graphics/pokemon/gen_9/cetoddle/icon.png differ diff --git a/graphics/pokemon/gen_9/charcadet/icon.png b/graphics/pokemon/gen_9/charcadet/icon.png index f62d09e918..50d9e46d88 100644 Binary files a/graphics/pokemon/gen_9/charcadet/icon.png and b/graphics/pokemon/gen_9/charcadet/icon.png differ diff --git a/graphics/pokemon/gen_9/chi_yu/icon.png b/graphics/pokemon/gen_9/chi_yu/icon.png index 1b922e696e..29a9114af0 100644 Binary files a/graphics/pokemon/gen_9/chi_yu/icon.png and b/graphics/pokemon/gen_9/chi_yu/icon.png differ diff --git a/graphics/pokemon/gen_9/chien_pao/icon.png b/graphics/pokemon/gen_9/chien_pao/icon.png index 02d7bbe93d..eaad400548 100644 Binary files a/graphics/pokemon/gen_9/chien_pao/icon.png and b/graphics/pokemon/gen_9/chien_pao/icon.png differ diff --git a/graphics/pokemon/gen_9/clodsire/icon.png b/graphics/pokemon/gen_9/clodsire/icon.png index 09fa007c68..bcc0e34e50 100644 Binary files a/graphics/pokemon/gen_9/clodsire/icon.png and b/graphics/pokemon/gen_9/clodsire/icon.png differ diff --git a/graphics/pokemon/gen_9/crocalor/icon.png b/graphics/pokemon/gen_9/crocalor/icon.png index 5ca0ee3f46..dea043b25f 100644 Binary files a/graphics/pokemon/gen_9/crocalor/icon.png and b/graphics/pokemon/gen_9/crocalor/icon.png differ diff --git a/graphics/pokemon/gen_9/dolliv/icon.png b/graphics/pokemon/gen_9/dolliv/icon.png index 37bd0eb19f..932b6e62eb 100644 Binary files a/graphics/pokemon/gen_9/dolliv/icon.png and b/graphics/pokemon/gen_9/dolliv/icon.png differ diff --git a/graphics/pokemon/gen_9/dudunsparce/icon.png b/graphics/pokemon/gen_9/dudunsparce/icon.png index e2a375ebf8..cf9c3501fe 100644 Binary files a/graphics/pokemon/gen_9/dudunsparce/icon.png and b/graphics/pokemon/gen_9/dudunsparce/icon.png differ diff --git a/graphics/pokemon/gen_9/espathra/icon.png b/graphics/pokemon/gen_9/espathra/icon.png index b82af0c6e2..cdca057311 100644 Binary files a/graphics/pokemon/gen_9/espathra/icon.png and b/graphics/pokemon/gen_9/espathra/icon.png differ diff --git a/include/battle_anim.h b/include/battle_anim.h index c41d94eb09..62aca91318 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -548,5 +548,6 @@ void AnimOutrageFlame(struct Sprite *sprite); // battle_anim_new.c void CoreEnforcerLoadBeamTarget(struct Sprite *sprite); void SpriteCB_RandomCentredHits(struct Sprite *sprite); +void InitSpritePosToAnimTargetsCentre(struct Sprite *sprite, bool32 respectMonPicOffsets); #endif // GUARD_BATTLE_ANIM_H diff --git a/include/birch_pc.h b/include/birch_pc.h new file mode 100644 index 0000000000..5e0e8d9c16 --- /dev/null +++ b/include/birch_pc.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BIRCH_PC_H +#define GUARD_BIRCH_PC_H + +const u8 *GetPokedexRatingText(u16 count); + +#endif // GUARD_BIRCH_PC_H diff --git a/include/gba/defines.h b/include/gba/defines.h index 65dfc5e855..6366355875 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -19,6 +19,7 @@ #endif #define ALIGNED(n) __attribute__((aligned(n))) +#define PACKED __attribute__((packed)) #define SOUND_INFO_PTR (*(struct SoundInfo **)0x3007FF0) #define INTR_CHECK (*(u16 *)0x3007FF8) diff --git a/include/gba/types.h b/include/gba/types.h index 2e92bbe86e..4acaee2d23 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -41,7 +41,7 @@ struct BgCnt u16 screenBaseBlock:5; u16 areaOverflowMode:1; u16 screenSize:2; -}; +} PACKED; typedef volatile struct BgCnt vBgCnt; struct PlttData diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index ed2180b986..0197bf2903 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -666,6 +666,7 @@ static bool32 AI_IsMoveEffectInPlus(u32 battlerAtk, u32 battlerDef, u32 move, s3 if (ShouldLowerStat(battlerDef, abilityDef, STAT_DEF) && noOfHitsToKo != 1) return TRUE; break; + case EFFECT_BULLDOZE: case EFFECT_SPEED_DOWN_HIT: if (ShouldLowerStat(battlerDef, abilityDef, STAT_SPEED) && noOfHitsToKo != 1) return TRUE; diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 91ac5e7841..f58aa97ee2 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -10,6 +10,7 @@ extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate; +static void AnimEllipticalGustCentered(struct Sprite *sprite); static void AnimEllipticalGust_Step(struct Sprite *); static void AnimGustToTarget(struct Sprite *); static void AnimGustToTarget_Step(struct Sprite *); @@ -32,6 +33,17 @@ static void AnimSkyAttackBird_Step(struct Sprite *); static void AnimTask_AnimateGustTornadoPalette_Step(u8); static void AnimTask_LoadWindstormBackground_Step(u8 taskId); +const struct SpriteTemplate gEllipticalGustCenteredSpriteTemplate = +{ + .tileTag = ANIM_TAG_GUST, + .paletteTag = ANIM_TAG_GUST, + .oam = &gOamData_AffineOff_ObjNormal_32x64, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = AnimEllipticalGustCentered, +}; + const struct SpriteTemplate gEllipticalGustSpriteTemplate = { .tileTag = ANIM_TAG_GUST, @@ -344,6 +356,15 @@ const struct SpriteTemplate gSkyAttackBirdSpriteTemplate = .callback = AnimSkyAttackBird, }; +// same as AnimEllipticalGust but centered on targets +static void AnimEllipticalGustCentered(struct Sprite *sprite) +{ + InitSpritePosToAnimTargetsCentre(sprite, FALSE); + sprite->y += 20; + sprite->data[1] = 191; + sprite->callback = AnimEllipticalGust_Step; + sprite->callback(sprite); +} void AnimEllipticalGust(struct Sprite *sprite) { diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index 5faa0a696a..1d4a0bd562 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -7247,7 +7247,7 @@ static void InitSpritePosToGivenTarget(struct Sprite *sprite, u8 target) sprite->y2 = gBattleAnimArgs[1]; } -static void InitSpritePosToAnimTargetsCentre(struct Sprite *sprite, bool8 respectMonPicOffsets) +void InitSpritePosToAnimTargetsCentre(struct Sprite *sprite, bool32 respectMonPicOffsets) { if (!respectMonPicOffsets) { diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index f710409229..3b2de5ddbb 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -413,6 +413,23 @@ u32 UnpackSelectedBattlePalettes(s16 selector) bool8 targetPartner = (selector >> 4) & 1; bool8 anim1 = (selector >> 5) & 1; bool8 anim2 = (selector >> 6) & 1; + u32 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gAnimMoveIndex); + + switch (moveTarget) + { + case MOVE_TARGET_BOTH: + if (target) { + targetPartner |= 1; + } + break; + case MOVE_TARGET_FOES_AND_ALLY: + if (target) { + targetPartner |= 1; + attackerPartner |= 1; + } + break; + } + return GetBattlePalettesMask(battleBackground, attacker, target, attackerPartner, targetPartner, anim1, anim2); } diff --git a/src/battle_anim_rock.c b/src/battle_anim_rock.c index 6811c857b3..7a84757cd9 100644 --- a/src/battle_anim_rock.c +++ b/src/battle_anim_rock.c @@ -456,11 +456,7 @@ void AnimRockFragment(struct Sprite *sprite) // Swirls particle in vortex. Used for moves like Fire Spin or Sand Tomb void AnimParticleInVortex(struct Sprite *sprite) { - if (gBattleAnimArgs[6] == ANIM_ATTACKER) - InitSpritePosToAnimAttacker(sprite, FALSE); - else - InitSpritePosToAnimTarget(sprite, FALSE); - + InitSpritePosToAnimBattler(gBattleAnimArgs[6], sprite, FALSE); sprite->data[0] = gBattleAnimArgs[3]; sprite->data[1] = gBattleAnimArgs[2]; sprite->data[2] = gBattleAnimArgs[4]; diff --git a/src/battle_intro.c b/src/battle_intro.c index 463804368f..5bb6ce9648 100644 --- a/src/battle_intro.c +++ b/src/battle_intro.c @@ -43,25 +43,25 @@ void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value) switch (attributeId) { case BG_ANIM_SCREEN_SIZE: - ((struct BgCnt *)&bgCnt)->screenSize = value; + ((vBgCnt *)&bgCnt)->screenSize = value; break; case BG_ANIM_AREA_OVERFLOW_MODE: - ((struct BgCnt *)&bgCnt)->areaOverflowMode = value; + ((vBgCnt *)&bgCnt)->areaOverflowMode = value; break; case BG_ANIM_MOSAIC: - ((struct BgCnt *)&bgCnt)->mosaic = value; + ((vBgCnt *)&bgCnt)->mosaic = value; break; case BG_ANIM_CHAR_BASE_BLOCK: - ((struct BgCnt *)&bgCnt)->charBaseBlock = value; + ((vBgCnt *)&bgCnt)->charBaseBlock = value; break; case BG_ANIM_PRIORITY: - ((struct BgCnt *)&bgCnt)->priority = value; + ((vBgCnt *)&bgCnt)->priority = value; break; case BG_ANIM_PALETTES_MODE: - ((struct BgCnt *)&bgCnt)->palettes = value; + ((vBgCnt *)&bgCnt)->palettes = value; break; case BG_ANIM_SCREEN_BASE_BLOCK: - ((struct BgCnt *)&bgCnt)->screenBaseBlock = value; + ((vBgCnt *)&bgCnt)->screenBaseBlock = value; break; } @@ -79,19 +79,19 @@ int GetAnimBgAttribute(u8 bgId, u8 attributeId) switch (attributeId) { case BG_ANIM_SCREEN_SIZE: - return ((struct BgCnt *)&bgCnt)->screenSize; + return ((vBgCnt *)&bgCnt)->screenSize; case BG_ANIM_AREA_OVERFLOW_MODE: - return ((struct BgCnt *)&bgCnt)->areaOverflowMode; + return ((vBgCnt *)&bgCnt)->areaOverflowMode; case BG_ANIM_MOSAIC: - return ((struct BgCnt *)&bgCnt)->mosaic; + return ((vBgCnt *)&bgCnt)->mosaic; case BG_ANIM_CHAR_BASE_BLOCK: - return ((struct BgCnt *)&bgCnt)->charBaseBlock; + return ((vBgCnt *)&bgCnt)->charBaseBlock; case BG_ANIM_PRIORITY: - return ((struct BgCnt *)&bgCnt)->priority; + return ((vBgCnt *)&bgCnt)->priority; case BG_ANIM_PALETTES_MODE: - return ((struct BgCnt *)&bgCnt)->palettes; + return ((vBgCnt *)&bgCnt)->palettes; case BG_ANIM_SCREEN_BASE_BLOCK: - return ((struct BgCnt *)&bgCnt)->screenBaseBlock; + return ((vBgCnt *)&bgCnt)->screenBaseBlock; } } diff --git a/src/battle_main.c b/src/battle_main.c index dd30137850..c77b38d6bc 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4967,6 +4967,8 @@ static void TurnValuesCleanUp(bool8 var0) gSideStatuses[B_SIDE_OPPONENT] &= ~(SIDE_STATUS_QUICK_GUARD | SIDE_STATUS_WIDE_GUARD | SIDE_STATUS_CRAFTY_SHIELD | SIDE_STATUS_MAT_BLOCK); gSideTimers[B_SIDE_PLAYER].followmeTimer = 0; gSideTimers[B_SIDE_OPPONENT].followmeTimer = 0; + + gBattleStruct->pledgeMove = FALSE; // combined pledge move may not have been used due to a canceller } void SpecialStatusesClear(void) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f848753da0..1624a9a7b3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1587,9 +1587,11 @@ static bool32 AccuracyCalcHelper(u16 move) if (WEATHER_HAS_EFFECT) { - if ((IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN) && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE))) + if (IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN) && + (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE || + move == MOVE_BLEAKWIND_STORM || move == MOVE_WILDBOLT_STORM || move == MOVE_SANDSEAR_STORM)) { - // thunder/hurricane ignore acc checks in rain unless target is holding utility umbrella + // thunder/hurricane/genie moves ignore acc checks in rain unless target is holding utility umbrella JumpIfMoveFailed(7, move); return TRUE; } @@ -3161,20 +3163,25 @@ void SetMoveEffect(bool32 primary, u32 certain) } break; case MOVE_EFFECT_FLINCH: - if (battlerAbility == ABILITY_INNER_FOCUS - && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) + if (battlerAbility == ABILITY_INNER_FOCUS) { - gLastUsedAbility = ABILITY_INNER_FOCUS; - gBattlerAbility = gEffectBattler; - RecordAbilityBattle(gEffectBattler, ABILITY_INNER_FOCUS); - gBattlescriptCurrInstr = BattleScript_FlinchPrevention; + if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN) + { + gLastUsedAbility = ABILITY_INNER_FOCUS; + gBattlerAbility = gEffectBattler; + RecordAbilityBattle(gEffectBattler, ABILITY_INNER_FOCUS); + gBattlescriptCurrInstr = BattleScript_FlinchPrevention; + } else + { + gBattlescriptCurrInstr++; + } } else if (GetBattlerTurnOrderNum(gEffectBattler) > gCurrentTurnActionNumber - && !IsDynamaxed(gEffectBattler)) + && !IsDynamaxed(gEffectBattler)) { - gBattleMons[gEffectBattler].status2 |= sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]; + gBattleMons[gEffectBattler].status2 |= sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]; + gBattlescriptCurrInstr++; } - gBattlescriptCurrInstr++; break; case MOVE_EFFECT_UPROAR: if (!(gBattleMons[gEffectBattler].status2 & STATUS2_UPROAR)) diff --git a/src/battle_util.c b/src/battle_util.c index e61b5048e2..66bd248763 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2933,7 +2933,7 @@ u8 DoBattlerEndTurnEffects(void) gBattleStruct->turnEffectsTracker++; break; case ENDTURN_SEA_OF_FIRE_DAMAGE: - if (gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_SEA_OF_FIRE) + if (IsBattlerAlive(battler) && gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_SEA_OF_FIRE) { gBattleMoveDamage = gBattleMons[battler].maxHP / 8; BtlController_EmitStatusAnimation(battler, BUFFER_A, FALSE, STATUS1_BURN); diff --git a/src/battle_z_move.c b/src/battle_z_move.c index a7bdb7a481..7a54575836 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -171,7 +171,8 @@ bool32 IsViableZMove(u8 battler, u16 move) if (gBattleStruct->zmove.used[battler]) return FALSE; - if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER)) + // Add '| BATTLE_TYPE_FRONTIER' to below if issues occur + if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL)) return FALSE; if ((GetBattlerPosition(battler) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battler) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_POWER_RING, 1)) diff --git a/src/birch_pc.c b/src/birch_pc.c index 8256a1378b..ba0085badb 100644 --- a/src/birch_pc.c +++ b/src/birch_pc.c @@ -20,66 +20,52 @@ bool16 ScriptGetPokedexInfo(void) return IsNationalPokedexEnabled(); } +// Species in this array are ignored in the progress towards a full regional dex +static const u16 sRegionalNotCountedList[] = { + SPECIES_JIRACHI, + SPECIES_DEOXYS, + SPECIES_NONE +}; + +#define BIRCH_DEX_STRINGS 21 + +static const u8 *const sBirchDexRatingTexts[BIRCH_DEX_STRINGS] = +{ + gBirchDexRatingText_LessThan10, + gBirchDexRatingText_LessThan20, + gBirchDexRatingText_LessThan30, + gBirchDexRatingText_LessThan40, + gBirchDexRatingText_LessThan50, + gBirchDexRatingText_LessThan60, + gBirchDexRatingText_LessThan70, + gBirchDexRatingText_LessThan80, + gBirchDexRatingText_LessThan90, + gBirchDexRatingText_LessThan100, + gBirchDexRatingText_LessThan110, + gBirchDexRatingText_LessThan120, + gBirchDexRatingText_LessThan130, + gBirchDexRatingText_LessThan140, + gBirchDexRatingText_LessThan150, + gBirchDexRatingText_LessThan160, + gBirchDexRatingText_LessThan170, + gBirchDexRatingText_LessThan180, + gBirchDexRatingText_LessThan190, + gBirchDexRatingText_LessThan200, + gBirchDexRatingText_DexCompleted, +}; + // This shows your Hoenn Pokédex rating and not your National Dex. const u8 *GetPokedexRatingText(u16 count) { - if (count < 10) - return gBirchDexRatingText_LessThan10; - if (count < 20) - return gBirchDexRatingText_LessThan20; - if (count < 30) - return gBirchDexRatingText_LessThan30; - if (count < 40) - return gBirchDexRatingText_LessThan40; - if (count < 50) - return gBirchDexRatingText_LessThan50; - if (count < 60) - return gBirchDexRatingText_LessThan60; - if (count < 70) - return gBirchDexRatingText_LessThan70; - if (count < 80) - return gBirchDexRatingText_LessThan80; - if (count < 90) - return gBirchDexRatingText_LessThan90; - if (count < 100) - return gBirchDexRatingText_LessThan100; - if (count < 110) - return gBirchDexRatingText_LessThan110; - if (count < 120) - return gBirchDexRatingText_LessThan120; - if (count < 130) - return gBirchDexRatingText_LessThan130; - if (count < 140) - return gBirchDexRatingText_LessThan140; - if (count < 150) - return gBirchDexRatingText_LessThan150; - if (count < 160) - return gBirchDexRatingText_LessThan160; - if (count < 170) - return gBirchDexRatingText_LessThan170; - if (count < 180) - return gBirchDexRatingText_LessThan180; - if (count < 190) - return gBirchDexRatingText_LessThan190; - if (count < 200) - return gBirchDexRatingText_LessThan200; - if (count == 200) + u32 i; + u16 maxDex = HOENN_DEX_COUNT - 1; + for(i = 0; sRegionalNotCountedList[i] != SPECIES_NONE; i++) { - if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT) - || GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200. - return gBirchDexRatingText_LessThan200; - return gBirchDexRatingText_DexCompleted; + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(sRegionalNotCountedList[i]), FLAG_GET_CAUGHT)) + count--; + maxDex--; } - if (count == HOENN_DEX_COUNT - 1) - { - if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT) - && GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // If both of these flags are enabled, it means the actual count is less than 200. - return gBirchDexRatingText_LessThan200; - return gBirchDexRatingText_DexCompleted; - } - if (count == HOENN_DEX_COUNT) - return gBirchDexRatingText_DexCompleted; - return gBirchDexRatingText_LessThan10; + return sBirchDexRatingTexts[(count * (BIRCH_DEX_STRINGS - 1)) / maxDex]; } void ShowPokedexRatingMessage(void) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index ea4876f67f..1462f86262 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -12946,7 +12946,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_FLYING, .accuracy = 80, .secondaryEffectChance = 30, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .category = BATTLE_CATEGORY_SPECIAL, .sheerForceBoost = TRUE, @@ -12966,7 +12966,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_ELECTRIC, .accuracy = 80, .secondaryEffectChance = 20, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .category = BATTLE_CATEGORY_SPECIAL, .sheerForceBoost = TRUE, @@ -12986,7 +12986,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_GROUND, .accuracy = 80, .secondaryEffectChance = 20, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .category = BATTLE_CATEGORY_SPECIAL, .sheerForceBoost = TRUE, @@ -13419,7 +13419,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .power = 100, .type = TYPE_FIGHTING, .accuracy = 100, - .pp = 10, + .pp = 5, .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, @@ -13434,7 +13434,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .power = 100, .type = TYPE_ELECTRIC, .accuracy = 100, - .pp = 10, + .pp = 5, .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, .priority = 0, diff --git a/src/data/pokemon/species_info/gen_1.h b/src/data/pokemon/species_info/gen_1.h index fbba8e5e2d..b503cb8334 100644 --- a/src/data/pokemon/species_info/gen_1.h +++ b/src/data/pokemon/species_info/gen_1.h @@ -3723,19 +3723,21 @@ const struct SpeciesInfo gSpeciesInfoGen1[] = .formSpeciesIdTable = sDiglettFormSpeciesIdTable, \ DIGLETT_FAMILY_MISC_INFO -#define DUGTRIO_MISC_INFO \ - .catchRate = 50, \ - .expYield = 149, \ - .evYield_Speed = 2, \ - .speciesName = _("Dugtrio"), \ - .cryId = CRY_DUGTRIO, \ - .natDexNum = NATIONAL_DEX_DUGTRIO, \ - .categoryName = _("Mole"), \ - .height = 7, \ - .pokemonScale = 406, \ - .pokemonOffset = 18, \ - .trainerScale = 256, \ - .trainerOffset = 0, \ +#define DUGTRIO_MISC_INFO \ + .catchRate = 50, \ + .expYield = 149, \ + .evYield_Speed = 2, \ + .speciesName = _("Dugtrio"), \ + .cryId = CRY_DUGTRIO, \ + .natDexNum = NATIONAL_DEX_DUGTRIO, \ + .categoryName = _("Mole"), \ + .height = 7, \ + .pokemonScale = 406, \ + .pokemonOffset = 18, \ + .trainerScale = 256, \ + .trainerOffset = 0, \ + .footprint = gMonFootprint_Dugtrio, \ + .formSpeciesIdTable = sDugtrioFormSpeciesIdTable, \ DIGLETT_FAMILY_MISC_INFO #define DUGTRIO_ATTACK (P_UPDATED_STATS >= GEN_7 ? 100 : 80) diff --git a/src/data/pokemon/species_info/gen_6.h b/src/data/pokemon/species_info/gen_6.h index a8c10c7947..ba7d054934 100644 --- a/src/data/pokemon/species_info/gen_6.h +++ b/src/data/pokemon/species_info/gen_6.h @@ -2860,7 +2860,7 @@ const struct SpeciesInfo gSpeciesInfoGen6[] = .frontAnimFrames = sAnims_Tyrantrum, .frontAnimId = ANIM_V_SHAKE, BACK_PIC(Tyrantrum, 64, 56), - .backPicYOffset = 11, + .backPicYOffset = 5, .backAnimId = BACK_ANIM_V_SHAKE_H_SLIDE, PALETTES(Tyrantrum), ICON(Tyrantrum, 0), diff --git a/src/data/pokemon/species_info/gen_8.h b/src/data/pokemon/species_info/gen_8.h index 91797c7f0c..89a176bc55 100644 --- a/src/data/pokemon/species_info/gen_8.h +++ b/src/data/pokemon/species_info/gen_8.h @@ -4259,7 +4259,7 @@ const struct SpeciesInfo gSpeciesInfoGen8[] = .frontAnimFrames = sAnims_Duraludon, //.frontAnimId = ANIM_V_SQUISH_AND_BOUNCE, BACK_PIC(Duraludon, 64, 64), - .backPicYOffset = 1, + .backPicYOffset = 0, //.backAnimId = BACK_ANIM_NONE, PALETTES(Duraludon), ICON(Duraludon, 0), diff --git a/src/debug.c b/src/debug.c index 023b032384..3842a14aef 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1574,8 +1574,16 @@ static void DebugTask_HandleMenuInput_FlagsVars(u8 taskId) PlaySE(SE_SELECT); if ((func = sDebugMenu_Actions_Flags[input]) != NULL) { - Debug_RedrawListMenu(taskId); - func(taskId); + if (input == DEBUG_FLAGVAR_MENU_ITEM_FLAGS || input == DEBUG_FLAGVAR_MENU_ITEM_VARS) + { + Debug_RedrawListMenu(taskId); + func(taskId); + } + else + { + func(taskId); + Debug_RedrawListMenu(taskId); + } // Remove TRUE/FALSE window for functions that haven't been assigned flags if (gTasks[taskId].tInput == 0xFF) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index f7a5d2c378..80689c264e 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -1132,6 +1132,12 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u dexNumber = SpeciesToPokedexNum(currMon->species); if (dexNumber != 0xFFFF) { + if (IsNationalPokedexEnabled()) + { + stringPtr[0] = (dexNumber / 1000) + CHAR_0; + stringPtr++; + dexNumber %= 1000; + } stringPtr[0] = (dexNumber / 100) + CHAR_0; stringPtr++; dexNumber %= 100; diff --git a/src/match_call.c b/src/match_call.c index 0c1176486e..2b2e5fc3c3 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -3,6 +3,7 @@ #include "battle.h" #include "battle_setup.h" #include "bg.h" +#include "birch_pc.h" #include "data.h" #include "event_data.h" #include "event_object_movement.h" @@ -1965,90 +1966,10 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) return streak; } -static u8 GetPokedexRatingLevel(u16 numSeen) -{ - if (numSeen < 10) - return 0; - if (numSeen < 20) - return 1; - if (numSeen < 30) - return 2; - if (numSeen < 40) - return 3; - if (numSeen < 50) - return 4; - if (numSeen < 60) - return 5; - if (numSeen < 70) - return 6; - if (numSeen < 80) - return 7; - if (numSeen < 90) - return 8; - if (numSeen < 100) - return 9; - if (numSeen < 110) - return 10; - if (numSeen < 120) - return 11; - if (numSeen < 130) - return 12; - if (numSeen < 140) - return 13; - if (numSeen < 150) - return 14; - if (numSeen < 160) - return 15; - if (numSeen < 170) - return 16; - if (numSeen < 180) - return 17; - if (numSeen < 190) - return 18; - if (numSeen < 200) - return 19; - - if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) - numSeen--; - if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)) - numSeen--; - - if (numSeen < 200) - return 19; - else - return 20; -} - -static const u8 *const sBirchDexRatingTexts[] = -{ - gBirchDexRatingText_LessThan10, - gBirchDexRatingText_LessThan20, - gBirchDexRatingText_LessThan30, - gBirchDexRatingText_LessThan40, - gBirchDexRatingText_LessThan50, - gBirchDexRatingText_LessThan60, - gBirchDexRatingText_LessThan70, - gBirchDexRatingText_LessThan80, - gBirchDexRatingText_LessThan90, - gBirchDexRatingText_LessThan100, - gBirchDexRatingText_LessThan110, - gBirchDexRatingText_LessThan120, - gBirchDexRatingText_LessThan130, - gBirchDexRatingText_LessThan140, - gBirchDexRatingText_LessThan150, - gBirchDexRatingText_LessThan160, - gBirchDexRatingText_LessThan170, - gBirchDexRatingText_LessThan180, - gBirchDexRatingText_LessThan190, - gBirchDexRatingText_LessThan200, - gBirchDexRatingText_DexCompleted, -}; - void BufferPokedexRatingForMatchCall(u8 *destStr) { int numSeen, numCaught; u8 *str; - u8 dexRatingLevel; u8 *buffer = Alloc(sizeof(gStringVar4)); if (!buffer) @@ -2061,12 +1982,11 @@ void BufferPokedexRatingForMatchCall(u8 *destStr) numCaught = GetHoennPokedexCount(FLAG_GET_CAUGHT); ConvertIntToDecimalStringN(gStringVar1, numSeen, STR_CONV_MODE_LEFT_ALIGN, 3); ConvertIntToDecimalStringN(gStringVar2, numCaught, STR_CONV_MODE_LEFT_ALIGN, 3); - dexRatingLevel = GetPokedexRatingLevel(numCaught); str = StringCopy(buffer, gBirchDexRatingText_AreYouCurious); *(str++) = CHAR_PROMPT_CLEAR; str = StringCopy(str, gBirchDexRatingText_SoYouveSeenAndCaught); *(str++) = CHAR_PROMPT_CLEAR; - StringCopy(str, sBirchDexRatingTexts[dexRatingLevel]); + StringCopy(str, GetPokedexRatingText(numCaught)); str = StringExpandPlaceholders(destStr, buffer); if (IsNationalPokedexEnabled()) diff --git a/src/party_menu.c b/src/party_menu.c index 6223e046b0..4eced9536f 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2786,7 +2786,7 @@ static void SetPartyMonFieldSelectionActions(struct Pokemon *mons, u8 slotId) // Add field moves to action list for (i = 0; i < MAX_MON_MOVES; i++) { - for (j = 0; sFieldMoves[j] != FIELD_MOVES_COUNT; j++) + for (j = 0; j != FIELD_MOVES_COUNT; j++) { if (GetMonData(&mons[slotId], i + MON_DATA_MOVE1) == sFieldMoves[j]) { diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index ac2f58f784..05e4bc6775 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -6440,13 +6440,37 @@ static u8 PrintPreEvolutions(u8 taskId, u16 species) u16 preEvolutionTwo = 0; u8 numPreEvolutions = 0; - bool8 isMega = FALSE; + u16 baseFormSpecies; sPokedexView->sEvoScreenData.isMega = FALSE; + //Check if it's a mega + baseFormSpecies = GetFormSpeciesId(species, 0); + if (baseFormSpecies != species) + { + const struct FormChange *formChanges = GetSpeciesFormChanges(baseFormSpecies); + for (i = 0; formChanges != NULL && formChanges[i].method != FORM_CHANGE_TERMINATOR; i++) + { + if (formChanges[i].method == FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM + && formChanges[i].targetSpecies == species) + { + preEvolutionOne = baseFormSpecies; + numPreEvolutions += 1; + sPokedexView->numPreEvolutions = numPreEvolutions; + sPokedexView->sEvoScreenData.numAllEvolutions += numPreEvolutions; + sPokedexView->sEvoScreenData.isMega = TRUE; + + CopyItemName(GetSpeciesFormChanges(species)->param1, gStringVar2); //item + CreateCaughtBallEvolutionScreen(preEvolutionOne, base_x - 9 - 8, base_y + base_y_offset*(numPreEvolutions - 1), 0); + HandlePreEvolutionSpeciesPrint(taskId, preEvolutionOne, species, base_x - 8, base_y, base_y_offset, numPreEvolutions - 1); + return numPreEvolutions; + } + } + } + //Calculate previous evolution for (i = 0; i < NUM_SPECIES; i++) { - const struct Evolution *evolutions = GetSpeciesEvolutions(species); + const struct Evolution *evolutions = GetSpeciesEvolutions(i); if (evolutions == NULL) continue; @@ -6456,35 +6480,17 @@ static u8 PrintPreEvolutions(u8 taskId, u16 species) { preEvolutionOne = i; numPreEvolutions += 1; - - if (GetSpeciesFormChanges(species) != NULL - && GetSpeciesFormChanges(species)->method == FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM) - { - CopyItemName(GetSpeciesFormChanges(species)->param1, gStringVar2); //item - isMega = TRUE; - } break; } } } - if (isMega) - { - sPokedexView->numPreEvolutions = numPreEvolutions; - sPokedexView->sEvoScreenData.numAllEvolutions += numPreEvolutions; - sPokedexView->sEvoScreenData.isMega = isMega; - - CreateCaughtBallEvolutionScreen(preEvolutionOne, base_x - 9 - 8, base_y + base_y_offset*(numPreEvolutions - 1), 0); - HandlePreEvolutionSpeciesPrint(taskId, preEvolutionOne, species, base_x - 8, base_y, base_y_offset, numPreEvolutions - 1); - return numPreEvolutions; - } - //Calculate if previous evolution also has a previous evolution if (numPreEvolutions != 0) { for (i = 0; i < NUM_SPECIES; i++) { - const struct Evolution *evolutions = GetSpeciesEvolutions(species); + const struct Evolution *evolutions = GetSpeciesEvolutions(i); if (evolutions == NULL) continue; diff --git a/src/pokemon.c b/src/pokemon.c index 5b055e9e80..ac70d41d1d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6263,7 +6263,7 @@ u16 SanitizeSpeciesId(u16 species) bool32 IsSpeciesEnabled(u16 species) { - return gSpeciesInfo[species].baseHP > 0; + return gSpeciesInfo[species].baseHP > 0 || species == SPECIES_EGG; } void TryToSetBattleFormChangeMoves(struct Pokemon *mon, u16 method) diff --git a/test/battle/ai.c b/test/battle/ai.c index ce52ba53dd..f8542d36c2 100644 --- a/test/battle/ai.c +++ b/test/battle/ai.c @@ -466,6 +466,21 @@ AI_DOUBLE_BATTLE_TEST("AI without any flags chooses moves at random - doubles") } } +AI_SINGLE_BATTLE_TEST("AI will choose either Rock Tomb or Bulldoze if Stat drop effect will activate and they kill with the same number of hits") +{ + GIVEN { + AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT); + PLAYER(SPECIES_WOBBUFFET) { HP(46); Speed(20); } + PLAYER(SPECIES_WYNAUT) { Speed(20); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(10); Moves(MOVE_BULLDOZE, MOVE_ROCK_TOMB); } + } WHEN { + TURN { EXPECT_MOVES(opponent, MOVE_BULLDOZE, MOVE_ROCK_TOMB); } + TURN { EXPECT_MOVES(opponent, MOVE_BULLDOZE, MOVE_ROCK_TOMB); SEND_OUT(player, 1); } + } SCENE { + MESSAGE("Wobbuffet fainted!"); + } +} + AI_SINGLE_BATTLE_TEST("AI_FLAG_SMART_MON_CHOICES: AI will not switch in a Pokemon which is slower and gets 1HKOed after fainting") { bool32 alakazamFirst;