diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 91173105b..35edaafa6 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -868,7 +868,8 @@ gBattleAnims_General:: .4byte General_AquaRingHeal @ B_ANIM_AQUA_RING_HEAL .4byte General_BeakBlastSetUp @ B_ANIM_BEAK_BLAST_SETUP .4byte General_ShellTrapSetUp @ B_ANIM_SHELL_TRAP_SETUP - .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE + .4byte General_ZMoveActivate @ B_ANIM_ZMOVE_ACTIVATE + .4byte General_AffectionHangedOn @ B_ANIM_AFFECTION_HANGED_ON .align 2 gBattleAnims_Special:: @@ -24883,6 +24884,27 @@ PrimalReversionParticles: delay 3 return +General_AffectionHangedOn:: + loadspritegfx ANIM_TAG_RED_HEART + loopsewithpan SE_M_CHARM, SOUND_PAN_ATTACKER, 12, 3 + createvisualtask AnimTask_SwayMon, 5, 0, 12, 4096, 4, ANIM_ATTACKER + delay 15 + launchtask AnimTask_AffectionHangedOn 0x5 0x0 + jumpargeq 0x0, FRIENDSHIP_100_TO_149, General_AffectionHangedOn_3Hearts + jumpargeq 0x0, FRIENDSHIP_150_TO_199, General_AffectionHangedOn_4Hearts + jumpargeq 0x0, FRIENDSHIP_200_TO_254, General_AffectionHangedOn_5Hearts + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -384, -31 +General_AffectionHangedOn_5Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -128, -22 +General_AffectionHangedOn_4Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 416, -38 +General_AffectionHangedOn_3Hearts: + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 160, -32 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, -256, -40 + createsprite gRedHeartBurstSpriteTemplate, ANIM_ATTACKER, 3, 128, -16 + waitforvisualfinish + end + SnatchMoveTrySwapFromSubstitute: createvisualtask AnimTask_IsAttackerBehindSubstitute, 2 jumprettrue SnatchMoveSwapSubstituteForMon diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5e6ab3392..9ecc3b179 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -415,6 +415,41 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectExtremeEvoboost @ EFFECT_EXTREME_EVOBOOST .4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN +BattleScript_AffectionBasedEndurance:: + playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON + printstring STRINGID_TARGETTOUGHEDITOUT + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_AffectionBasedStatusHeal:: + jumpifstatus BS_ATTACKER, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString + jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatus_HealSleepString + jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatus_HealParalysisString + jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatus_HealBurnString + jumpifstatus BS_ATTACKER, STATUS1_FREEZE, BattleScript_AffectionBasedStatus_HealFreezeString + end2 +BattleScript_AffectionBasedStatus_HealPoisonString: + printstring STRINGID_ATTACKEREXPELLEDTHEPOISON + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealSleepString: + printstring STRINGID_ATTACKERSHOOKITSELFAWAKE + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealParalysisString: + printstring STRINGID_ATTACKERBROKETHROUGHPARALYSIS + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealBurnString: + printstring STRINGID_ATTACKERHEALEDITSBURN + goto BattleScript_AffectionBasedStatusHeal_Continue +BattleScript_AffectionBasedStatus_HealFreezeString: + printstring STRINGID_ATTACKERMELTEDTHEICE +BattleScript_AffectionBasedStatusHeal_Continue: + waitmessage B_WAIT_TIME_LONG + clearstatus BS_ATTACKER + waitstate + updatestatusicon BS_ATTACKER + waitstate + end2 + BattleScript_EffectSteelBeam:: attackcanceler attackstring @@ -7257,6 +7292,10 @@ BattleScript_SelectingNotAllowedStuffCheeks:: printselectionstring STRINGID_STUFFCHEEKSCANTSELECT endselectionscript +BattleScript_SelectingNotAllowedStuffCheeksInPalace:: + printstring STRINGID_STUFFCHEEKSCANTSELECT + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_SelectingNotAllowedBelch:: printselectionstring STRINGID_BELCHCANTSELECT endselectionscript @@ -9197,14 +9236,34 @@ BattleScript_SelectingNotAllowedMoveChoiceItem:: printselectionstring STRINGID_ITEMALLOWSONLYYMOVE endselectionscript +BattleScript_SelectingNotAllowedMoveChoiceItemInPalace:: + printstring STRINGID_ITEMALLOWSONLYYMOVE + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_SelectingNotAllowedMoveGorillaTactics:: printselectionstring STRINGID_ABILITYALLOWSONLYMOVE endselectionscript +BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace:: + printstring STRINGID_ABILITYALLOWSONLYMOVE + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_SelectingNotAllowedMoveAssaultVest:: printselectionstring STRINGID_ASSAULTVESTDOESNTALLOW endselectionscript +BattleScript_SelectingNotAllowedMoveAssaultVestInPalace:: + printstring STRINGID_ASSAULTVESTDOESNTALLOW + goto BattleScript_SelectingUnusableMoveInPalace + +BattleScript_SelectingNotAllowedPlaceholder:: + printselectionstring STRINGID_NOTDONEYET + endselectionscript + +BattleScript_SelectingNotAllowedPlaceholderInPalace:: + printstring STRINGID_NOTDONEYET + goto BattleScript_SelectingUnusableMoveInPalace + BattleScript_HangedOnMsg:: playanimation BS_TARGET, B_ANIM_HANGED_ON printstring STRINGID_PKMNHUNGONWITHX diff --git a/graphics/pokemon/mega_abomasnow/back.png b/graphics/pokemon/abomasnow/mega/back.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/back.png rename to graphics/pokemon/abomasnow/mega/back.png diff --git a/graphics/pokemon/mega_abomasnow/front.png b/graphics/pokemon/abomasnow/mega/front.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/front.png rename to graphics/pokemon/abomasnow/mega/front.png diff --git a/graphics/pokemon/mega_abomasnow/icon.png b/graphics/pokemon/abomasnow/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_abomasnow/icon.png rename to graphics/pokemon/abomasnow/mega/icon.png diff --git a/graphics/pokemon/mega_abomasnow/normal.pal b/graphics/pokemon/abomasnow/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_abomasnow/normal.pal rename to graphics/pokemon/abomasnow/mega/normal.pal diff --git a/graphics/pokemon/mega_abomasnow/shiny.pal b/graphics/pokemon/abomasnow/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_abomasnow/shiny.pal rename to graphics/pokemon/abomasnow/mega/shiny.pal diff --git a/graphics/pokemon/mega_absol/back.png b/graphics/pokemon/absol/mega/back.png similarity index 100% rename from graphics/pokemon/mega_absol/back.png rename to graphics/pokemon/absol/mega/back.png diff --git a/graphics/pokemon/mega_absol/front.png b/graphics/pokemon/absol/mega/front.png similarity index 100% rename from graphics/pokemon/mega_absol/front.png rename to graphics/pokemon/absol/mega/front.png diff --git a/graphics/pokemon/mega_absol/icon.png b/graphics/pokemon/absol/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_absol/icon.png rename to graphics/pokemon/absol/mega/icon.png diff --git a/graphics/pokemon/mega_absol/normal.pal b/graphics/pokemon/absol/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_absol/normal.pal rename to graphics/pokemon/absol/mega/normal.pal diff --git a/graphics/pokemon/mega_absol/shiny.pal b/graphics/pokemon/absol/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_absol/shiny.pal rename to graphics/pokemon/absol/mega/shiny.pal diff --git a/graphics/pokemon/mega_aerodactyl/back.png b/graphics/pokemon/aerodactyl/mega/back.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/back.png rename to graphics/pokemon/aerodactyl/mega/back.png diff --git a/graphics/pokemon/mega_aerodactyl/front.png b/graphics/pokemon/aerodactyl/mega/front.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/front.png rename to graphics/pokemon/aerodactyl/mega/front.png diff --git a/graphics/pokemon/mega_aerodactyl/icon.png b/graphics/pokemon/aerodactyl/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_aerodactyl/icon.png rename to graphics/pokemon/aerodactyl/mega/icon.png diff --git a/graphics/pokemon/mega_aerodactyl/normal.pal b/graphics/pokemon/aerodactyl/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_aerodactyl/normal.pal rename to graphics/pokemon/aerodactyl/mega/normal.pal diff --git a/graphics/pokemon/mega_aerodactyl/shiny.pal b/graphics/pokemon/aerodactyl/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_aerodactyl/shiny.pal rename to graphics/pokemon/aerodactyl/mega/shiny.pal diff --git a/graphics/pokemon/mega_aggron/back.png b/graphics/pokemon/aggron/mega/back.png similarity index 100% rename from graphics/pokemon/mega_aggron/back.png rename to graphics/pokemon/aggron/mega/back.png diff --git a/graphics/pokemon/mega_aggron/front.png b/graphics/pokemon/aggron/mega/front.png similarity index 100% rename from graphics/pokemon/mega_aggron/front.png rename to graphics/pokemon/aggron/mega/front.png diff --git a/graphics/pokemon/mega_aggron/icon.png b/graphics/pokemon/aggron/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_aggron/icon.png rename to graphics/pokemon/aggron/mega/icon.png diff --git a/graphics/pokemon/mega_aggron/normal.pal b/graphics/pokemon/aggron/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_aggron/normal.pal rename to graphics/pokemon/aggron/mega/normal.pal diff --git a/graphics/pokemon/mega_aggron/shiny.pal b/graphics/pokemon/aggron/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_aggron/shiny.pal rename to graphics/pokemon/aggron/mega/shiny.pal diff --git a/graphics/pokemon/mega_alakazam/back.png b/graphics/pokemon/alakazam/mega/back.png similarity index 100% rename from graphics/pokemon/mega_alakazam/back.png rename to graphics/pokemon/alakazam/mega/back.png diff --git a/graphics/pokemon/mega_alakazam/front.png b/graphics/pokemon/alakazam/mega/front.png similarity index 100% rename from graphics/pokemon/mega_alakazam/front.png rename to graphics/pokemon/alakazam/mega/front.png diff --git a/graphics/pokemon/mega_alakazam/icon.png b/graphics/pokemon/alakazam/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_alakazam/icon.png rename to graphics/pokemon/alakazam/mega/icon.png diff --git a/graphics/pokemon/mega_alakazam/normal.pal b/graphics/pokemon/alakazam/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_alakazam/normal.pal rename to graphics/pokemon/alakazam/mega/normal.pal diff --git a/graphics/pokemon/mega_alakazam/shiny.pal b/graphics/pokemon/alakazam/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_alakazam/shiny.pal rename to graphics/pokemon/alakazam/mega/shiny.pal diff --git a/graphics/pokemon/mega_altaria/back.png b/graphics/pokemon/altaria/mega/back.png similarity index 100% rename from graphics/pokemon/mega_altaria/back.png rename to graphics/pokemon/altaria/mega/back.png diff --git a/graphics/pokemon/mega_altaria/front.png b/graphics/pokemon/altaria/mega/front.png similarity index 100% rename from graphics/pokemon/mega_altaria/front.png rename to graphics/pokemon/altaria/mega/front.png diff --git a/graphics/pokemon/mega_altaria/icon.png b/graphics/pokemon/altaria/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_altaria/icon.png rename to graphics/pokemon/altaria/mega/icon.png diff --git a/graphics/pokemon/mega_altaria/normal.pal b/graphics/pokemon/altaria/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_altaria/normal.pal rename to graphics/pokemon/altaria/mega/normal.pal diff --git a/graphics/pokemon/mega_altaria/shiny.pal b/graphics/pokemon/altaria/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_altaria/shiny.pal rename to graphics/pokemon/altaria/mega/shiny.pal diff --git a/graphics/pokemon/mega_ampharos/back.png b/graphics/pokemon/ampharos/mega/back.png similarity index 100% rename from graphics/pokemon/mega_ampharos/back.png rename to graphics/pokemon/ampharos/mega/back.png diff --git a/graphics/pokemon/mega_ampharos/front.png b/graphics/pokemon/ampharos/mega/front.png similarity index 100% rename from graphics/pokemon/mega_ampharos/front.png rename to graphics/pokemon/ampharos/mega/front.png diff --git a/graphics/pokemon/mega_ampharos/icon.png b/graphics/pokemon/ampharos/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_ampharos/icon.png rename to graphics/pokemon/ampharos/mega/icon.png diff --git a/graphics/pokemon/mega_ampharos/normal.pal b/graphics/pokemon/ampharos/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_ampharos/normal.pal rename to graphics/pokemon/ampharos/mega/normal.pal diff --git a/graphics/pokemon/mega_ampharos/shiny.pal b/graphics/pokemon/ampharos/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_ampharos/shiny.pal rename to graphics/pokemon/ampharos/mega/shiny.pal diff --git a/graphics/pokemon/appletun/icon.png b/graphics/pokemon/appletun/icon.png index 66de1521a..3b474c0f0 100644 Binary files a/graphics/pokemon/appletun/icon.png and b/graphics/pokemon/appletun/icon.png differ diff --git a/graphics/pokemon/applin/icon.png b/graphics/pokemon/applin/icon.png index c518f91a0..ce9fee4a9 100644 Binary files a/graphics/pokemon/applin/icon.png and b/graphics/pokemon/applin/icon.png differ diff --git a/graphics/pokemon/articuno/galarian/icon.png b/graphics/pokemon/articuno/galarian/icon.png index ce061cbc0..556bd42b4 100644 Binary files a/graphics/pokemon/articuno/galarian/icon.png and b/graphics/pokemon/articuno/galarian/icon.png differ diff --git a/graphics/pokemon/mega_audino/back.png b/graphics/pokemon/audino/mega/back.png similarity index 100% rename from graphics/pokemon/mega_audino/back.png rename to graphics/pokemon/audino/mega/back.png diff --git a/graphics/pokemon/mega_audino/front.png b/graphics/pokemon/audino/mega/front.png similarity index 100% rename from graphics/pokemon/mega_audino/front.png rename to graphics/pokemon/audino/mega/front.png diff --git a/graphics/pokemon/mega_audino/icon.png b/graphics/pokemon/audino/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_audino/icon.png rename to graphics/pokemon/audino/mega/icon.png diff --git a/graphics/pokemon/mega_audino/normal.pal b/graphics/pokemon/audino/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_audino/normal.pal rename to graphics/pokemon/audino/mega/normal.pal diff --git a/graphics/pokemon/mega_audino/shiny.pal b/graphics/pokemon/audino/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_audino/shiny.pal rename to graphics/pokemon/audino/mega/shiny.pal diff --git a/graphics/pokemon/mega_banette/back.png b/graphics/pokemon/banette/mega/back.png similarity index 100% rename from graphics/pokemon/mega_banette/back.png rename to graphics/pokemon/banette/mega/back.png diff --git a/graphics/pokemon/mega_banette/front.png b/graphics/pokemon/banette/mega/front.png similarity index 100% rename from graphics/pokemon/mega_banette/front.png rename to graphics/pokemon/banette/mega/front.png diff --git a/graphics/pokemon/mega_banette/icon.png b/graphics/pokemon/banette/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_banette/icon.png rename to graphics/pokemon/banette/mega/icon.png diff --git a/graphics/pokemon/mega_banette/normal.pal b/graphics/pokemon/banette/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_banette/normal.pal rename to graphics/pokemon/banette/mega/normal.pal diff --git a/graphics/pokemon/mega_banette/shiny.pal b/graphics/pokemon/banette/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_banette/shiny.pal rename to graphics/pokemon/banette/mega/shiny.pal diff --git a/graphics/pokemon/mega_beedrill/back.png b/graphics/pokemon/beedrill/mega/back.png similarity index 100% rename from graphics/pokemon/mega_beedrill/back.png rename to graphics/pokemon/beedrill/mega/back.png diff --git a/graphics/pokemon/mega_beedrill/front.png b/graphics/pokemon/beedrill/mega/front.png similarity index 100% rename from graphics/pokemon/mega_beedrill/front.png rename to graphics/pokemon/beedrill/mega/front.png diff --git a/graphics/pokemon/beedrill/mega/icon.png b/graphics/pokemon/beedrill/mega/icon.png new file mode 100644 index 000000000..9a1788b7e Binary files /dev/null and b/graphics/pokemon/beedrill/mega/icon.png differ diff --git a/graphics/pokemon/mega_beedrill/normal.pal b/graphics/pokemon/beedrill/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_beedrill/normal.pal rename to graphics/pokemon/beedrill/mega/normal.pal diff --git a/graphics/pokemon/mega_beedrill/shiny.pal b/graphics/pokemon/beedrill/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_beedrill/shiny.pal rename to graphics/pokemon/beedrill/mega/shiny.pal diff --git a/graphics/pokemon/mega_blastoise/back.png b/graphics/pokemon/blastoise/mega/back.png similarity index 100% rename from graphics/pokemon/mega_blastoise/back.png rename to graphics/pokemon/blastoise/mega/back.png diff --git a/graphics/pokemon/mega_blastoise/front.png b/graphics/pokemon/blastoise/mega/front.png similarity index 100% rename from graphics/pokemon/mega_blastoise/front.png rename to graphics/pokemon/blastoise/mega/front.png diff --git a/graphics/pokemon/mega_blastoise/icon.png b/graphics/pokemon/blastoise/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_blastoise/icon.png rename to graphics/pokemon/blastoise/mega/icon.png diff --git a/graphics/pokemon/mega_blastoise/normal.pal b/graphics/pokemon/blastoise/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_blastoise/normal.pal rename to graphics/pokemon/blastoise/mega/normal.pal diff --git a/graphics/pokemon/mega_blastoise/shiny.pal b/graphics/pokemon/blastoise/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_blastoise/shiny.pal rename to graphics/pokemon/blastoise/mega/shiny.pal diff --git a/graphics/pokemon/mega_blaziken/back.png b/graphics/pokemon/blaziken/mega/back.png similarity index 100% rename from graphics/pokemon/mega_blaziken/back.png rename to graphics/pokemon/blaziken/mega/back.png diff --git a/graphics/pokemon/mega_blaziken/front.png b/graphics/pokemon/blaziken/mega/front.png similarity index 100% rename from graphics/pokemon/mega_blaziken/front.png rename to graphics/pokemon/blaziken/mega/front.png diff --git a/graphics/pokemon/mega_blaziken/icon.png b/graphics/pokemon/blaziken/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_blaziken/icon.png rename to graphics/pokemon/blaziken/mega/icon.png diff --git a/graphics/pokemon/mega_blaziken/normal.pal b/graphics/pokemon/blaziken/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_blaziken/normal.pal rename to graphics/pokemon/blaziken/mega/normal.pal diff --git a/graphics/pokemon/mega_blaziken/shiny.pal b/graphics/pokemon/blaziken/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_blaziken/shiny.pal rename to graphics/pokemon/blaziken/mega/shiny.pal diff --git a/graphics/pokemon/blipbug/icon.png b/graphics/pokemon/blipbug/icon.png index e4ce3a937..b3cf1cf79 100644 Binary files a/graphics/pokemon/blipbug/icon.png and b/graphics/pokemon/blipbug/icon.png differ diff --git a/graphics/pokemon/mega_camerupt/back.png b/graphics/pokemon/camerupt/mega/back.png similarity index 100% rename from graphics/pokemon/mega_camerupt/back.png rename to graphics/pokemon/camerupt/mega/back.png diff --git a/graphics/pokemon/mega_camerupt/front.png b/graphics/pokemon/camerupt/mega/front.png similarity index 100% rename from graphics/pokemon/mega_camerupt/front.png rename to graphics/pokemon/camerupt/mega/front.png diff --git a/graphics/pokemon/mega_camerupt/icon.png b/graphics/pokemon/camerupt/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_camerupt/icon.png rename to graphics/pokemon/camerupt/mega/icon.png diff --git a/graphics/pokemon/mega_camerupt/normal.pal b/graphics/pokemon/camerupt/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_camerupt/normal.pal rename to graphics/pokemon/camerupt/mega/normal.pal diff --git a/graphics/pokemon/mega_camerupt/shiny.pal b/graphics/pokemon/camerupt/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_camerupt/shiny.pal rename to graphics/pokemon/camerupt/mega/shiny.pal diff --git a/graphics/pokemon/mega_charizard_x/back.png b/graphics/pokemon/charizard/mega_x/back.png similarity index 100% rename from graphics/pokemon/mega_charizard_x/back.png rename to graphics/pokemon/charizard/mega_x/back.png diff --git a/graphics/pokemon/mega_charizard_x/front.png b/graphics/pokemon/charizard/mega_x/front.png similarity index 100% rename from graphics/pokemon/mega_charizard_x/front.png rename to graphics/pokemon/charizard/mega_x/front.png diff --git a/graphics/pokemon/mega_charizard_x/icon.png b/graphics/pokemon/charizard/mega_x/icon.png similarity index 100% rename from graphics/pokemon/mega_charizard_x/icon.png rename to graphics/pokemon/charizard/mega_x/icon.png diff --git a/graphics/pokemon/mega_charizard_x/normal.pal b/graphics/pokemon/charizard/mega_x/normal.pal similarity index 100% rename from graphics/pokemon/mega_charizard_x/normal.pal rename to graphics/pokemon/charizard/mega_x/normal.pal diff --git a/graphics/pokemon/mega_charizard_x/shiny.pal b/graphics/pokemon/charizard/mega_x/shiny.pal similarity index 100% rename from graphics/pokemon/mega_charizard_x/shiny.pal rename to graphics/pokemon/charizard/mega_x/shiny.pal diff --git a/graphics/pokemon/mega_charizard_y/back.png b/graphics/pokemon/charizard/mega_y/back.png similarity index 100% rename from graphics/pokemon/mega_charizard_y/back.png rename to graphics/pokemon/charizard/mega_y/back.png diff --git a/graphics/pokemon/mega_charizard_y/front.png b/graphics/pokemon/charizard/mega_y/front.png similarity index 100% rename from graphics/pokemon/mega_charizard_y/front.png rename to graphics/pokemon/charizard/mega_y/front.png diff --git a/graphics/pokemon/mega_charizard_y/icon.png b/graphics/pokemon/charizard/mega_y/icon.png similarity index 100% rename from graphics/pokemon/mega_charizard_y/icon.png rename to graphics/pokemon/charizard/mega_y/icon.png diff --git a/graphics/pokemon/mega_charizard_y/normal.pal b/graphics/pokemon/charizard/mega_y/normal.pal similarity index 100% rename from graphics/pokemon/mega_charizard_y/normal.pal rename to graphics/pokemon/charizard/mega_y/normal.pal diff --git a/graphics/pokemon/mega_charizard_y/shiny.pal b/graphics/pokemon/charizard/mega_y/shiny.pal similarity index 100% rename from graphics/pokemon/mega_charizard_y/shiny.pal rename to graphics/pokemon/charizard/mega_y/shiny.pal diff --git a/graphics/pokemon/mega_diancie/back.png b/graphics/pokemon/diancie/mega/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_diancie/back.png rename to graphics/pokemon/diancie/mega/back.png diff --git a/graphics/pokemon/mega_diancie/front.png b/graphics/pokemon/diancie/mega/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_diancie/front.png rename to graphics/pokemon/diancie/mega/front.png diff --git a/graphics/pokemon/mega_diancie/icon.png b/graphics/pokemon/diancie/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_diancie/icon.png rename to graphics/pokemon/diancie/mega/icon.png diff --git a/graphics/pokemon/mega_diancie/normal.pal b/graphics/pokemon/diancie/mega/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_diancie/normal.pal rename to graphics/pokemon/diancie/mega/normal.pal diff --git a/graphics/pokemon/mega_diancie/shiny.pal b/graphics/pokemon/diancie/mega/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_diancie/shiny.pal rename to graphics/pokemon/diancie/mega/shiny.pal diff --git a/graphics/pokemon/alolan_diglett/back.png b/graphics/pokemon/diglett/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_diglett/back.png rename to graphics/pokemon/diglett/alolan/back.png diff --git a/graphics/pokemon/alolan_diglett/front.png b/graphics/pokemon/diglett/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_diglett/front.png rename to graphics/pokemon/diglett/alolan/front.png diff --git a/graphics/pokemon/alolan_diglett/icon.png b/graphics/pokemon/diglett/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_diglett/icon.png rename to graphics/pokemon/diglett/alolan/icon.png diff --git a/graphics/pokemon/alolan_diglett/normal.pal b/graphics/pokemon/diglett/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_diglett/normal.pal rename to graphics/pokemon/diglett/alolan/normal.pal diff --git a/graphics/pokemon/alolan_diglett/shiny.pal b/graphics/pokemon/diglett/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_diglett/shiny.pal rename to graphics/pokemon/diglett/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_dugtrio/back.png b/graphics/pokemon/dugtrio/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_dugtrio/back.png rename to graphics/pokemon/dugtrio/alolan/back.png diff --git a/graphics/pokemon/alolan_dugtrio/front.png b/graphics/pokemon/dugtrio/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_dugtrio/front.png rename to graphics/pokemon/dugtrio/alolan/front.png diff --git a/graphics/pokemon/alolan_dugtrio/icon.png b/graphics/pokemon/dugtrio/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_dugtrio/icon.png rename to graphics/pokemon/dugtrio/alolan/icon.png diff --git a/graphics/pokemon/alolan_dugtrio/normal.pal b/graphics/pokemon/dugtrio/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_dugtrio/normal.pal rename to graphics/pokemon/dugtrio/alolan/normal.pal diff --git a/graphics/pokemon/alolan_dugtrio/shiny.pal b/graphics/pokemon/dugtrio/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_dugtrio/shiny.pal rename to graphics/pokemon/dugtrio/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_exeggutor/back.png b/graphics/pokemon/exeggutor/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_exeggutor/back.png rename to graphics/pokemon/exeggutor/alolan/back.png diff --git a/graphics/pokemon/alolan_exeggutor/front.png b/graphics/pokemon/exeggutor/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_exeggutor/front.png rename to graphics/pokemon/exeggutor/alolan/front.png diff --git a/graphics/pokemon/alolan_exeggutor/icon.png b/graphics/pokemon/exeggutor/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_exeggutor/icon.png rename to graphics/pokemon/exeggutor/alolan/icon.png diff --git a/graphics/pokemon/alolan_exeggutor/normal.pal b/graphics/pokemon/exeggutor/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_exeggutor/normal.pal rename to graphics/pokemon/exeggutor/alolan/normal.pal diff --git a/graphics/pokemon/alolan_exeggutor/shiny.pal b/graphics/pokemon/exeggutor/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_exeggutor/shiny.pal rename to graphics/pokemon/exeggutor/alolan/shiny.pal diff --git a/graphics/pokemon/mega_gallade/back.png b/graphics/pokemon/gallade/mega/back.png similarity index 100% rename from graphics/pokemon/mega_gallade/back.png rename to graphics/pokemon/gallade/mega/back.png diff --git a/graphics/pokemon/mega_gallade/front.png b/graphics/pokemon/gallade/mega/front.png similarity index 100% rename from graphics/pokemon/mega_gallade/front.png rename to graphics/pokemon/gallade/mega/front.png diff --git a/graphics/pokemon/mega_gallade/icon.png b/graphics/pokemon/gallade/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_gallade/icon.png rename to graphics/pokemon/gallade/mega/icon.png diff --git a/graphics/pokemon/mega_gallade/normal.pal b/graphics/pokemon/gallade/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_gallade/normal.pal rename to graphics/pokemon/gallade/mega/normal.pal diff --git a/graphics/pokemon/mega_gallade/shiny.pal b/graphics/pokemon/gallade/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_gallade/shiny.pal rename to graphics/pokemon/gallade/mega/shiny.pal diff --git a/graphics/pokemon/mega_garchomp/back.png b/graphics/pokemon/garchomp/mega/back.png similarity index 100% rename from graphics/pokemon/mega_garchomp/back.png rename to graphics/pokemon/garchomp/mega/back.png diff --git a/graphics/pokemon/mega_garchomp/front.png b/graphics/pokemon/garchomp/mega/front.png similarity index 100% rename from graphics/pokemon/mega_garchomp/front.png rename to graphics/pokemon/garchomp/mega/front.png diff --git a/graphics/pokemon/garchomp/mega/icon.png b/graphics/pokemon/garchomp/mega/icon.png new file mode 100644 index 000000000..4e37e0813 Binary files /dev/null and b/graphics/pokemon/garchomp/mega/icon.png differ diff --git a/graphics/pokemon/mega_garchomp/normal.pal b/graphics/pokemon/garchomp/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_garchomp/normal.pal rename to graphics/pokemon/garchomp/mega/normal.pal diff --git a/graphics/pokemon/mega_garchomp/shiny.pal b/graphics/pokemon/garchomp/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_garchomp/shiny.pal rename to graphics/pokemon/garchomp/mega/shiny.pal diff --git a/graphics/pokemon/mega_gardevoir/back.png b/graphics/pokemon/gardevoir/mega/back.png similarity index 100% rename from graphics/pokemon/mega_gardevoir/back.png rename to graphics/pokemon/gardevoir/mega/back.png diff --git a/graphics/pokemon/mega_gardevoir/front.png b/graphics/pokemon/gardevoir/mega/front.png similarity index 100% rename from graphics/pokemon/mega_gardevoir/front.png rename to graphics/pokemon/gardevoir/mega/front.png diff --git a/graphics/pokemon/mega_gardevoir/icon.png b/graphics/pokemon/gardevoir/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_gardevoir/icon.png rename to graphics/pokemon/gardevoir/mega/icon.png diff --git a/graphics/pokemon/mega_gardevoir/normal.pal b/graphics/pokemon/gardevoir/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_gardevoir/normal.pal rename to graphics/pokemon/gardevoir/mega/normal.pal diff --git a/graphics/pokemon/mega_gardevoir/shiny.pal b/graphics/pokemon/gardevoir/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_gardevoir/shiny.pal rename to graphics/pokemon/gardevoir/mega/shiny.pal diff --git a/graphics/pokemon/mega_gengar/back.png b/graphics/pokemon/gengar/mega/back.png similarity index 100% rename from graphics/pokemon/mega_gengar/back.png rename to graphics/pokemon/gengar/mega/back.png diff --git a/graphics/pokemon/mega_gengar/front.png b/graphics/pokemon/gengar/mega/front.png similarity index 100% rename from graphics/pokemon/mega_gengar/front.png rename to graphics/pokemon/gengar/mega/front.png diff --git a/graphics/pokemon/mega_gengar/icon.png b/graphics/pokemon/gengar/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_gengar/icon.png rename to graphics/pokemon/gengar/mega/icon.png diff --git a/graphics/pokemon/mega_gengar/normal.pal b/graphics/pokemon/gengar/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_gengar/normal.pal rename to graphics/pokemon/gengar/mega/normal.pal diff --git a/graphics/pokemon/mega_gengar/shiny.pal b/graphics/pokemon/gengar/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_gengar/shiny.pal rename to graphics/pokemon/gengar/mega/shiny.pal diff --git a/graphics/pokemon/alolan_geodude/back.png b/graphics/pokemon/geodude/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_geodude/back.png rename to graphics/pokemon/geodude/alolan/back.png diff --git a/graphics/pokemon/alolan_geodude/front.png b/graphics/pokemon/geodude/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_geodude/front.png rename to graphics/pokemon/geodude/alolan/front.png diff --git a/graphics/pokemon/alolan_geodude/icon.png b/graphics/pokemon/geodude/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_geodude/icon.png rename to graphics/pokemon/geodude/alolan/icon.png diff --git a/graphics/pokemon/alolan_geodude/normal.pal b/graphics/pokemon/geodude/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_geodude/normal.pal rename to graphics/pokemon/geodude/alolan/normal.pal diff --git a/graphics/pokemon/alolan_geodude/shiny.pal b/graphics/pokemon/geodude/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_geodude/shiny.pal rename to graphics/pokemon/geodude/alolan/shiny.pal diff --git a/graphics/pokemon/mega_glalie/back.png b/graphics/pokemon/glalie/mega/back.png similarity index 100% rename from graphics/pokemon/mega_glalie/back.png rename to graphics/pokemon/glalie/mega/back.png diff --git a/graphics/pokemon/mega_glalie/front.png b/graphics/pokemon/glalie/mega/front.png similarity index 100% rename from graphics/pokemon/mega_glalie/front.png rename to graphics/pokemon/glalie/mega/front.png diff --git a/graphics/pokemon/glalie/mega/icon.png b/graphics/pokemon/glalie/mega/icon.png new file mode 100644 index 000000000..d563426c4 Binary files /dev/null and b/graphics/pokemon/glalie/mega/icon.png differ diff --git a/graphics/pokemon/mega_glalie/normal.pal b/graphics/pokemon/glalie/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_glalie/normal.pal rename to graphics/pokemon/glalie/mega/normal.pal diff --git a/graphics/pokemon/mega_glalie/shiny.pal b/graphics/pokemon/glalie/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_glalie/shiny.pal rename to graphics/pokemon/glalie/mega/shiny.pal diff --git a/graphics/pokemon/alolan_golem/back.png b/graphics/pokemon/golem/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/back.png rename to graphics/pokemon/golem/alolan/back.png diff --git a/graphics/pokemon/alolan_golem/front.png b/graphics/pokemon/golem/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/front.png rename to graphics/pokemon/golem/alolan/front.png diff --git a/graphics/pokemon/alolan_golem/icon.png b/graphics/pokemon/golem/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/icon.png rename to graphics/pokemon/golem/alolan/icon.png diff --git a/graphics/pokemon/alolan_golem/normal.pal b/graphics/pokemon/golem/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/normal.pal rename to graphics/pokemon/golem/alolan/normal.pal diff --git a/graphics/pokemon/alolan_golem/shiny.pal b/graphics/pokemon/golem/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_golem/shiny.pal rename to graphics/pokemon/golem/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_graveler/back.png b/graphics/pokemon/graveler/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/back.png rename to graphics/pokemon/graveler/alolan/back.png diff --git a/graphics/pokemon/alolan_graveler/front.png b/graphics/pokemon/graveler/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/front.png rename to graphics/pokemon/graveler/alolan/front.png diff --git a/graphics/pokemon/alolan_graveler/icon.png b/graphics/pokemon/graveler/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/icon.png rename to graphics/pokemon/graveler/alolan/icon.png diff --git a/graphics/pokemon/alolan_graveler/normal.pal b/graphics/pokemon/graveler/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/normal.pal rename to graphics/pokemon/graveler/alolan/normal.pal diff --git a/graphics/pokemon/alolan_graveler/shiny.pal b/graphics/pokemon/graveler/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_graveler/shiny.pal rename to graphics/pokemon/graveler/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_grimer/back.png b/graphics/pokemon/grimer/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/back.png rename to graphics/pokemon/grimer/alolan/back.png diff --git a/graphics/pokemon/alolan_grimer/front.png b/graphics/pokemon/grimer/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/front.png rename to graphics/pokemon/grimer/alolan/front.png diff --git a/graphics/pokemon/alolan_grimer/icon.png b/graphics/pokemon/grimer/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/icon.png rename to graphics/pokemon/grimer/alolan/icon.png diff --git a/graphics/pokemon/alolan_grimer/normal.pal b/graphics/pokemon/grimer/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/normal.pal rename to graphics/pokemon/grimer/alolan/normal.pal diff --git a/graphics/pokemon/alolan_grimer/shiny.pal b/graphics/pokemon/grimer/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_grimer/shiny.pal rename to graphics/pokemon/grimer/alolan/shiny.pal diff --git a/graphics/pokemon/primal_groudon/back.png b/graphics/pokemon/groudon/primal/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/back.png rename to graphics/pokemon/groudon/primal/back.png diff --git a/graphics/pokemon/primal_groudon/front.png b/graphics/pokemon/groudon/primal/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/front.png rename to graphics/pokemon/groudon/primal/front.png diff --git a/graphics/pokemon/primal_groudon/icon.png b/graphics/pokemon/groudon/primal/icon.png similarity index 100% rename from graphics/pokemon/primal_groudon/icon.png rename to graphics/pokemon/groudon/primal/icon.png diff --git a/graphics/pokemon/primal_groudon/normal.pal b/graphics/pokemon/groudon/primal/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/normal.pal rename to graphics/pokemon/groudon/primal/normal.pal diff --git a/graphics/pokemon/primal_groudon/shiny.pal b/graphics/pokemon/groudon/primal/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_groudon/shiny.pal rename to graphics/pokemon/groudon/primal/shiny.pal diff --git a/graphics/pokemon/mega_gyarados/back.png b/graphics/pokemon/gyarados/mega/back.png similarity index 100% rename from graphics/pokemon/mega_gyarados/back.png rename to graphics/pokemon/gyarados/mega/back.png diff --git a/graphics/pokemon/mega_gyarados/front.png b/graphics/pokemon/gyarados/mega/front.png similarity index 100% rename from graphics/pokemon/mega_gyarados/front.png rename to graphics/pokemon/gyarados/mega/front.png diff --git a/graphics/pokemon/mega_gyarados/icon.png b/graphics/pokemon/gyarados/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_gyarados/icon.png rename to graphics/pokemon/gyarados/mega/icon.png diff --git a/graphics/pokemon/mega_gyarados/normal.pal b/graphics/pokemon/gyarados/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_gyarados/normal.pal rename to graphics/pokemon/gyarados/mega/normal.pal diff --git a/graphics/pokemon/mega_gyarados/shiny.pal b/graphics/pokemon/gyarados/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_gyarados/shiny.pal rename to graphics/pokemon/gyarados/mega/shiny.pal diff --git a/graphics/pokemon/mega_heracross/back.png b/graphics/pokemon/heracross/mega/back.png similarity index 100% rename from graphics/pokemon/mega_heracross/back.png rename to graphics/pokemon/heracross/mega/back.png diff --git a/graphics/pokemon/mega_heracross/front.png b/graphics/pokemon/heracross/mega/front.png similarity index 100% rename from graphics/pokemon/mega_heracross/front.png rename to graphics/pokemon/heracross/mega/front.png diff --git a/graphics/pokemon/mega_heracross/icon.png b/graphics/pokemon/heracross/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_heracross/icon.png rename to graphics/pokemon/heracross/mega/icon.png diff --git a/graphics/pokemon/mega_heracross/normal.pal b/graphics/pokemon/heracross/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_heracross/normal.pal rename to graphics/pokemon/heracross/mega/normal.pal diff --git a/graphics/pokemon/mega_heracross/shiny.pal b/graphics/pokemon/heracross/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_heracross/shiny.pal rename to graphics/pokemon/heracross/mega/shiny.pal diff --git a/graphics/pokemon/mega_houndoom/back.png b/graphics/pokemon/houndoom/mega/back.png similarity index 100% rename from graphics/pokemon/mega_houndoom/back.png rename to graphics/pokemon/houndoom/mega/back.png diff --git a/graphics/pokemon/mega_houndoom/front.png b/graphics/pokemon/houndoom/mega/front.png similarity index 100% rename from graphics/pokemon/mega_houndoom/front.png rename to graphics/pokemon/houndoom/mega/front.png diff --git a/graphics/pokemon/mega_houndoom/icon.png b/graphics/pokemon/houndoom/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_houndoom/icon.png rename to graphics/pokemon/houndoom/mega/icon.png diff --git a/graphics/pokemon/mega_houndoom/normal.pal b/graphics/pokemon/houndoom/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_houndoom/normal.pal rename to graphics/pokemon/houndoom/mega/normal.pal diff --git a/graphics/pokemon/mega_houndoom/shiny.pal b/graphics/pokemon/houndoom/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_houndoom/shiny.pal rename to graphics/pokemon/houndoom/mega/shiny.pal diff --git a/graphics/pokemon/mega_kangaskhan/back.png b/graphics/pokemon/kangaskhan/mega/back.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/back.png rename to graphics/pokemon/kangaskhan/mega/back.png diff --git a/graphics/pokemon/mega_kangaskhan/front.png b/graphics/pokemon/kangaskhan/mega/front.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/front.png rename to graphics/pokemon/kangaskhan/mega/front.png diff --git a/graphics/pokemon/mega_kangaskhan/icon.png b/graphics/pokemon/kangaskhan/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_kangaskhan/icon.png rename to graphics/pokemon/kangaskhan/mega/icon.png diff --git a/graphics/pokemon/mega_kangaskhan/normal.pal b/graphics/pokemon/kangaskhan/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_kangaskhan/normal.pal rename to graphics/pokemon/kangaskhan/mega/normal.pal diff --git a/graphics/pokemon/mega_kangaskhan/shiny.pal b/graphics/pokemon/kangaskhan/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_kangaskhan/shiny.pal rename to graphics/pokemon/kangaskhan/mega/shiny.pal diff --git a/graphics/pokemon/primal_kyogre/back.png b/graphics/pokemon/kyogre/primal/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/back.png rename to graphics/pokemon/kyogre/primal/back.png diff --git a/graphics/pokemon/primal_kyogre/front.png b/graphics/pokemon/kyogre/primal/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/front.png rename to graphics/pokemon/kyogre/primal/front.png diff --git a/graphics/pokemon/primal_kyogre/icon.png b/graphics/pokemon/kyogre/primal/icon.png similarity index 100% rename from graphics/pokemon/primal_kyogre/icon.png rename to graphics/pokemon/kyogre/primal/icon.png diff --git a/graphics/pokemon/primal_kyogre/normal.pal b/graphics/pokemon/kyogre/primal/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/normal.pal rename to graphics/pokemon/kyogre/primal/normal.pal diff --git a/graphics/pokemon/primal_kyogre/shiny.pal b/graphics/pokemon/kyogre/primal/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/primal_kyogre/shiny.pal rename to graphics/pokemon/kyogre/primal/shiny.pal diff --git a/graphics/pokemon/mega_latias/back.png b/graphics/pokemon/latias/mega/back.png similarity index 100% rename from graphics/pokemon/mega_latias/back.png rename to graphics/pokemon/latias/mega/back.png diff --git a/graphics/pokemon/mega_latias/front.png b/graphics/pokemon/latias/mega/front.png similarity index 100% rename from graphics/pokemon/mega_latias/front.png rename to graphics/pokemon/latias/mega/front.png diff --git a/graphics/pokemon/latias/mega/icon.png b/graphics/pokemon/latias/mega/icon.png new file mode 100644 index 000000000..0d022d802 Binary files /dev/null and b/graphics/pokemon/latias/mega/icon.png differ diff --git a/graphics/pokemon/mega_latias/normal.pal b/graphics/pokemon/latias/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_latias/normal.pal rename to graphics/pokemon/latias/mega/normal.pal diff --git a/graphics/pokemon/mega_latias/shiny.pal b/graphics/pokemon/latias/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_latias/shiny.pal rename to graphics/pokemon/latias/mega/shiny.pal diff --git a/graphics/pokemon/mega_latios/back.png b/graphics/pokemon/latios/mega/back.png similarity index 100% rename from graphics/pokemon/mega_latios/back.png rename to graphics/pokemon/latios/mega/back.png diff --git a/graphics/pokemon/mega_latios/front.png b/graphics/pokemon/latios/mega/front.png similarity index 100% rename from graphics/pokemon/mega_latios/front.png rename to graphics/pokemon/latios/mega/front.png diff --git a/graphics/pokemon/latios/mega/icon.png b/graphics/pokemon/latios/mega/icon.png new file mode 100644 index 000000000..8d594c2fa Binary files /dev/null and b/graphics/pokemon/latios/mega/icon.png differ diff --git a/graphics/pokemon/mega_latios/normal.pal b/graphics/pokemon/latios/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_latios/normal.pal rename to graphics/pokemon/latios/mega/normal.pal diff --git a/graphics/pokemon/mega_latios/shiny.pal b/graphics/pokemon/latios/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_latios/shiny.pal rename to graphics/pokemon/latios/mega/shiny.pal diff --git a/graphics/pokemon/mega_lopunny/back.png b/graphics/pokemon/lopunny/mega/back.png similarity index 100% rename from graphics/pokemon/mega_lopunny/back.png rename to graphics/pokemon/lopunny/mega/back.png diff --git a/graphics/pokemon/mega_lopunny/front.png b/graphics/pokemon/lopunny/mega/front.png similarity index 100% rename from graphics/pokemon/mega_lopunny/front.png rename to graphics/pokemon/lopunny/mega/front.png diff --git a/graphics/pokemon/mega_lopunny/icon.png b/graphics/pokemon/lopunny/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_lopunny/icon.png rename to graphics/pokemon/lopunny/mega/icon.png diff --git a/graphics/pokemon/mega_lopunny/normal.pal b/graphics/pokemon/lopunny/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_lopunny/normal.pal rename to graphics/pokemon/lopunny/mega/normal.pal diff --git a/graphics/pokemon/mega_lopunny/shiny.pal b/graphics/pokemon/lopunny/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_lopunny/shiny.pal rename to graphics/pokemon/lopunny/mega/shiny.pal diff --git a/graphics/pokemon/mega_lucario/back.png b/graphics/pokemon/lucario/mega/back.png similarity index 100% rename from graphics/pokemon/mega_lucario/back.png rename to graphics/pokemon/lucario/mega/back.png diff --git a/graphics/pokemon/mega_lucario/front.png b/graphics/pokemon/lucario/mega/front.png similarity index 100% rename from graphics/pokemon/mega_lucario/front.png rename to graphics/pokemon/lucario/mega/front.png diff --git a/graphics/pokemon/mega_lucario/icon.png b/graphics/pokemon/lucario/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_lucario/icon.png rename to graphics/pokemon/lucario/mega/icon.png diff --git a/graphics/pokemon/mega_lucario/normal.pal b/graphics/pokemon/lucario/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_lucario/normal.pal rename to graphics/pokemon/lucario/mega/normal.pal diff --git a/graphics/pokemon/mega_lucario/shiny.pal b/graphics/pokemon/lucario/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_lucario/shiny.pal rename to graphics/pokemon/lucario/mega/shiny.pal diff --git a/graphics/pokemon/mega_manectric/back.png b/graphics/pokemon/manectric/mega/back.png similarity index 100% rename from graphics/pokemon/mega_manectric/back.png rename to graphics/pokemon/manectric/mega/back.png diff --git a/graphics/pokemon/mega_manectric/front.png b/graphics/pokemon/manectric/mega/front.png similarity index 100% rename from graphics/pokemon/mega_manectric/front.png rename to graphics/pokemon/manectric/mega/front.png diff --git a/graphics/pokemon/mega_manectric/icon.png b/graphics/pokemon/manectric/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_manectric/icon.png rename to graphics/pokemon/manectric/mega/icon.png diff --git a/graphics/pokemon/mega_manectric/normal.pal b/graphics/pokemon/manectric/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_manectric/normal.pal rename to graphics/pokemon/manectric/mega/normal.pal diff --git a/graphics/pokemon/mega_manectric/shiny.pal b/graphics/pokemon/manectric/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_manectric/shiny.pal rename to graphics/pokemon/manectric/mega/shiny.pal diff --git a/graphics/pokemon/alolan_marowak/back.png b/graphics/pokemon/marowak/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_marowak/back.png rename to graphics/pokemon/marowak/alolan/back.png diff --git a/graphics/pokemon/alolan_marowak/front.png b/graphics/pokemon/marowak/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_marowak/front.png rename to graphics/pokemon/marowak/alolan/front.png diff --git a/graphics/pokemon/alolan_marowak/icon.png b/graphics/pokemon/marowak/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_marowak/icon.png rename to graphics/pokemon/marowak/alolan/icon.png diff --git a/graphics/pokemon/alolan_marowak/normal.pal b/graphics/pokemon/marowak/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_marowak/normal.pal rename to graphics/pokemon/marowak/alolan/normal.pal diff --git a/graphics/pokemon/alolan_marowak/shiny.pal b/graphics/pokemon/marowak/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_marowak/shiny.pal rename to graphics/pokemon/marowak/alolan/shiny.pal diff --git a/graphics/pokemon/mega_mawile/back.png b/graphics/pokemon/mawile/mega/back.png similarity index 100% rename from graphics/pokemon/mega_mawile/back.png rename to graphics/pokemon/mawile/mega/back.png diff --git a/graphics/pokemon/mega_mawile/front.png b/graphics/pokemon/mawile/mega/front.png similarity index 100% rename from graphics/pokemon/mega_mawile/front.png rename to graphics/pokemon/mawile/mega/front.png diff --git a/graphics/pokemon/mawile/mega/icon.png b/graphics/pokemon/mawile/mega/icon.png new file mode 100644 index 000000000..6fdec15cc Binary files /dev/null and b/graphics/pokemon/mawile/mega/icon.png differ diff --git a/graphics/pokemon/mega_mawile/normal.pal b/graphics/pokemon/mawile/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_mawile/normal.pal rename to graphics/pokemon/mawile/mega/normal.pal diff --git a/graphics/pokemon/mega_mawile/shiny.pal b/graphics/pokemon/mawile/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_mawile/shiny.pal rename to graphics/pokemon/mawile/mega/shiny.pal diff --git a/graphics/pokemon/mega_medicham/back.png b/graphics/pokemon/medicham/mega/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_medicham/back.png rename to graphics/pokemon/medicham/mega/back.png diff --git a/graphics/pokemon/mega_medicham/front.png b/graphics/pokemon/medicham/mega/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_medicham/front.png rename to graphics/pokemon/medicham/mega/front.png diff --git a/graphics/pokemon/mega_medicham/icon.png b/graphics/pokemon/medicham/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_medicham/icon.png rename to graphics/pokemon/medicham/mega/icon.png diff --git a/graphics/pokemon/mega_medicham/normal.pal b/graphics/pokemon/medicham/mega/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_medicham/normal.pal rename to graphics/pokemon/medicham/mega/normal.pal diff --git a/graphics/pokemon/mega_medicham/shiny.pal b/graphics/pokemon/medicham/mega/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/mega_medicham/shiny.pal rename to graphics/pokemon/medicham/mega/shiny.pal diff --git a/graphics/pokemon/mega_beedrill/icon.png b/graphics/pokemon/mega_beedrill/icon.png deleted file mode 100644 index 4c5b8fe46..000000000 Binary files a/graphics/pokemon/mega_beedrill/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_garchomp/icon.png b/graphics/pokemon/mega_garchomp/icon.png deleted file mode 100644 index 168638243..000000000 Binary files a/graphics/pokemon/mega_garchomp/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_glalie/icon.png b/graphics/pokemon/mega_glalie/icon.png deleted file mode 100644 index 02596508e..000000000 Binary files a/graphics/pokemon/mega_glalie/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_latias/icon.png b/graphics/pokemon/mega_latias/icon.png deleted file mode 100644 index 9c4c1c20f..000000000 Binary files a/graphics/pokemon/mega_latias/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_latios/icon.png b/graphics/pokemon/mega_latios/icon.png deleted file mode 100644 index 011c2d8f6..000000000 Binary files a/graphics/pokemon/mega_latios/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_mawile/icon.png b/graphics/pokemon/mega_mawile/icon.png deleted file mode 100644 index 81e49c897..000000000 Binary files a/graphics/pokemon/mega_mawile/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_pidgeot/icon.png b/graphics/pokemon/mega_pidgeot/icon.png deleted file mode 100644 index 255fffe58..000000000 Binary files a/graphics/pokemon/mega_pidgeot/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_scizor/icon.png b/graphics/pokemon/mega_scizor/icon.png deleted file mode 100644 index e6a4eb065..000000000 Binary files a/graphics/pokemon/mega_scizor/icon.png and /dev/null differ diff --git a/graphics/pokemon/mega_slowbro/icon.png b/graphics/pokemon/mega_slowbro/icon.png deleted file mode 100644 index 621fe4184..000000000 Binary files a/graphics/pokemon/mega_slowbro/icon.png and /dev/null differ diff --git a/graphics/pokemon/alolan_meowth/back.png b/graphics/pokemon/meowth/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/back.png rename to graphics/pokemon/meowth/alolan/back.png diff --git a/graphics/pokemon/alolan_meowth/front.png b/graphics/pokemon/meowth/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/front.png rename to graphics/pokemon/meowth/alolan/front.png diff --git a/graphics/pokemon/alolan_meowth/icon.png b/graphics/pokemon/meowth/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/icon.png rename to graphics/pokemon/meowth/alolan/icon.png diff --git a/graphics/pokemon/alolan_meowth/normal.pal b/graphics/pokemon/meowth/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/normal.pal rename to graphics/pokemon/meowth/alolan/normal.pal diff --git a/graphics/pokemon/alolan_meowth/shiny.pal b/graphics/pokemon/meowth/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_meowth/shiny.pal rename to graphics/pokemon/meowth/alolan/shiny.pal diff --git a/graphics/pokemon/mega_metagross/back.png b/graphics/pokemon/metagross/mega/back.png similarity index 100% rename from graphics/pokemon/mega_metagross/back.png rename to graphics/pokemon/metagross/mega/back.png diff --git a/graphics/pokemon/mega_metagross/front.png b/graphics/pokemon/metagross/mega/front.png similarity index 100% rename from graphics/pokemon/mega_metagross/front.png rename to graphics/pokemon/metagross/mega/front.png diff --git a/graphics/pokemon/mega_metagross/icon.png b/graphics/pokemon/metagross/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_metagross/icon.png rename to graphics/pokemon/metagross/mega/icon.png diff --git a/graphics/pokemon/mega_metagross/normal.pal b/graphics/pokemon/metagross/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_metagross/normal.pal rename to graphics/pokemon/metagross/mega/normal.pal diff --git a/graphics/pokemon/mega_metagross/shiny.pal b/graphics/pokemon/metagross/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_metagross/shiny.pal rename to graphics/pokemon/metagross/mega/shiny.pal diff --git a/graphics/pokemon/mega_mewtwo_x/back.png b/graphics/pokemon/mewtwo/mega_x/back.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/back.png rename to graphics/pokemon/mewtwo/mega_x/back.png diff --git a/graphics/pokemon/mega_mewtwo_x/front.png b/graphics/pokemon/mewtwo/mega_x/front.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/front.png rename to graphics/pokemon/mewtwo/mega_x/front.png diff --git a/graphics/pokemon/mega_mewtwo_x/icon.png b/graphics/pokemon/mewtwo/mega_x/icon.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/icon.png rename to graphics/pokemon/mewtwo/mega_x/icon.png diff --git a/graphics/pokemon/mega_mewtwo_x/normal.pal b/graphics/pokemon/mewtwo/mega_x/normal.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/normal.pal rename to graphics/pokemon/mewtwo/mega_x/normal.pal diff --git a/graphics/pokemon/mega_mewtwo_x/shiny.pal b/graphics/pokemon/mewtwo/mega_x/shiny.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_x/shiny.pal rename to graphics/pokemon/mewtwo/mega_x/shiny.pal diff --git a/graphics/pokemon/mega_mewtwo_y/back.png b/graphics/pokemon/mewtwo/mega_y/back.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/back.png rename to graphics/pokemon/mewtwo/mega_y/back.png diff --git a/graphics/pokemon/mega_mewtwo_y/front.png b/graphics/pokemon/mewtwo/mega_y/front.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/front.png rename to graphics/pokemon/mewtwo/mega_y/front.png diff --git a/graphics/pokemon/mega_mewtwo_y/icon.png b/graphics/pokemon/mewtwo/mega_y/icon.png similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/icon.png rename to graphics/pokemon/mewtwo/mega_y/icon.png diff --git a/graphics/pokemon/mega_mewtwo_y/normal.pal b/graphics/pokemon/mewtwo/mega_y/normal.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/normal.pal rename to graphics/pokemon/mewtwo/mega_y/normal.pal diff --git a/graphics/pokemon/mega_mewtwo_y/shiny.pal b/graphics/pokemon/mewtwo/mega_y/shiny.pal similarity index 100% rename from graphics/pokemon/mega_mewtwo_y/shiny.pal rename to graphics/pokemon/mewtwo/mega_y/shiny.pal diff --git a/graphics/pokemon/moltres/galarian/icon.png b/graphics/pokemon/moltres/galarian/icon.png index 90edae521..0f469cbf5 100644 Binary files a/graphics/pokemon/moltres/galarian/icon.png and b/graphics/pokemon/moltres/galarian/icon.png differ diff --git a/graphics/pokemon/alolan_muk/back.png b/graphics/pokemon/muk/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_muk/back.png rename to graphics/pokemon/muk/alolan/back.png diff --git a/graphics/pokemon/alolan_muk/front.png b/graphics/pokemon/muk/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_muk/front.png rename to graphics/pokemon/muk/alolan/front.png diff --git a/graphics/pokemon/alolan_muk/icon.png b/graphics/pokemon/muk/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_muk/icon.png rename to graphics/pokemon/muk/alolan/icon.png diff --git a/graphics/pokemon/alolan_muk/normal.pal b/graphics/pokemon/muk/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_muk/normal.pal rename to graphics/pokemon/muk/alolan/normal.pal diff --git a/graphics/pokemon/alolan_muk/shiny.pal b/graphics/pokemon/muk/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_muk/shiny.pal rename to graphics/pokemon/muk/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_ninetales/back.png b/graphics/pokemon/ninetales/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_ninetales/back.png rename to graphics/pokemon/ninetales/alolan/back.png diff --git a/graphics/pokemon/alolan_ninetales/front.png b/graphics/pokemon/ninetales/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_ninetales/front.png rename to graphics/pokemon/ninetales/alolan/front.png diff --git a/graphics/pokemon/alolan_ninetales/icon.png b/graphics/pokemon/ninetales/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_ninetales/icon.png rename to graphics/pokemon/ninetales/alolan/icon.png diff --git a/graphics/pokemon/alolan_ninetales/normal.pal b/graphics/pokemon/ninetales/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_ninetales/normal.pal rename to graphics/pokemon/ninetales/alolan/normal.pal diff --git a/graphics/pokemon/alolan_ninetales/shiny.pal b/graphics/pokemon/ninetales/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_ninetales/shiny.pal rename to graphics/pokemon/ninetales/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_persian/back.png b/graphics/pokemon/persian/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_persian/back.png rename to graphics/pokemon/persian/alolan/back.png diff --git a/graphics/pokemon/alolan_persian/front.png b/graphics/pokemon/persian/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_persian/front.png rename to graphics/pokemon/persian/alolan/front.png diff --git a/graphics/pokemon/alolan_persian/icon.png b/graphics/pokemon/persian/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_persian/icon.png rename to graphics/pokemon/persian/alolan/icon.png diff --git a/graphics/pokemon/alolan_persian/normal.pal b/graphics/pokemon/persian/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_persian/normal.pal rename to graphics/pokemon/persian/alolan/normal.pal diff --git a/graphics/pokemon/alolan_persian/shiny.pal b/graphics/pokemon/persian/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_persian/shiny.pal rename to graphics/pokemon/persian/alolan/shiny.pal diff --git a/graphics/pokemon/mega_pidgeot/back.png b/graphics/pokemon/pidgeot/mega/back.png similarity index 100% rename from graphics/pokemon/mega_pidgeot/back.png rename to graphics/pokemon/pidgeot/mega/back.png diff --git a/graphics/pokemon/mega_pidgeot/front.png b/graphics/pokemon/pidgeot/mega/front.png similarity index 100% rename from graphics/pokemon/mega_pidgeot/front.png rename to graphics/pokemon/pidgeot/mega/front.png diff --git a/graphics/pokemon/pidgeot/mega/icon.png b/graphics/pokemon/pidgeot/mega/icon.png new file mode 100644 index 000000000..32cb6e1f1 Binary files /dev/null and b/graphics/pokemon/pidgeot/mega/icon.png differ diff --git a/graphics/pokemon/mega_pidgeot/normal.pal b/graphics/pokemon/pidgeot/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_pidgeot/normal.pal rename to graphics/pokemon/pidgeot/mega/normal.pal diff --git a/graphics/pokemon/mega_pidgeot/shiny.pal b/graphics/pokemon/pidgeot/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_pidgeot/shiny.pal rename to graphics/pokemon/pidgeot/mega/shiny.pal diff --git a/graphics/pokemon/mega_pinsir/back.png b/graphics/pokemon/pinsir/mega/back.png similarity index 100% rename from graphics/pokemon/mega_pinsir/back.png rename to graphics/pokemon/pinsir/mega/back.png diff --git a/graphics/pokemon/mega_pinsir/front.png b/graphics/pokemon/pinsir/mega/front.png similarity index 100% rename from graphics/pokemon/mega_pinsir/front.png rename to graphics/pokemon/pinsir/mega/front.png diff --git a/graphics/pokemon/mega_pinsir/icon.png b/graphics/pokemon/pinsir/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_pinsir/icon.png rename to graphics/pokemon/pinsir/mega/icon.png diff --git a/graphics/pokemon/mega_pinsir/normal.pal b/graphics/pokemon/pinsir/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_pinsir/normal.pal rename to graphics/pokemon/pinsir/mega/normal.pal diff --git a/graphics/pokemon/mega_pinsir/shiny.pal b/graphics/pokemon/pinsir/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_pinsir/shiny.pal rename to graphics/pokemon/pinsir/mega/shiny.pal diff --git a/graphics/pokemon/alolan_raichu/back.png b/graphics/pokemon/raichu/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/back.png rename to graphics/pokemon/raichu/alolan/back.png diff --git a/graphics/pokemon/alolan_raichu/front.png b/graphics/pokemon/raichu/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/front.png rename to graphics/pokemon/raichu/alolan/front.png diff --git a/graphics/pokemon/alolan_raichu/icon.png b/graphics/pokemon/raichu/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/icon.png rename to graphics/pokemon/raichu/alolan/icon.png diff --git a/graphics/pokemon/alolan_raichu/normal.pal b/graphics/pokemon/raichu/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/normal.pal rename to graphics/pokemon/raichu/alolan/normal.pal diff --git a/graphics/pokemon/alolan_raichu/shiny.pal b/graphics/pokemon/raichu/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raichu/shiny.pal rename to graphics/pokemon/raichu/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_raticate/back.png b/graphics/pokemon/raticate/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/back.png rename to graphics/pokemon/raticate/alolan/back.png diff --git a/graphics/pokemon/alolan_raticate/front.png b/graphics/pokemon/raticate/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/front.png rename to graphics/pokemon/raticate/alolan/front.png diff --git a/graphics/pokemon/alolan_raticate/icon.png b/graphics/pokemon/raticate/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/icon.png rename to graphics/pokemon/raticate/alolan/icon.png diff --git a/graphics/pokemon/alolan_raticate/normal.pal b/graphics/pokemon/raticate/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/normal.pal rename to graphics/pokemon/raticate/alolan/normal.pal diff --git a/graphics/pokemon/alolan_raticate/shiny.pal b/graphics/pokemon/raticate/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_raticate/shiny.pal rename to graphics/pokemon/raticate/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_rattata/back.png b/graphics/pokemon/rattata/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/back.png rename to graphics/pokemon/rattata/alolan/back.png diff --git a/graphics/pokemon/alolan_rattata/front.png b/graphics/pokemon/rattata/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/front.png rename to graphics/pokemon/rattata/alolan/front.png diff --git a/graphics/pokemon/alolan_rattata/icon.png b/graphics/pokemon/rattata/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/icon.png rename to graphics/pokemon/rattata/alolan/icon.png diff --git a/graphics/pokemon/alolan_rattata/normal.pal b/graphics/pokemon/rattata/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/normal.pal rename to graphics/pokemon/rattata/alolan/normal.pal diff --git a/graphics/pokemon/alolan_rattata/shiny.pal b/graphics/pokemon/rattata/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_rattata/shiny.pal rename to graphics/pokemon/rattata/alolan/shiny.pal diff --git a/graphics/pokemon/mega_rayquaza/back.png b/graphics/pokemon/rayquaza/mega/back.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/back.png rename to graphics/pokemon/rayquaza/mega/back.png diff --git a/graphics/pokemon/mega_rayquaza/front.png b/graphics/pokemon/rayquaza/mega/front.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/front.png rename to graphics/pokemon/rayquaza/mega/front.png diff --git a/graphics/pokemon/mega_rayquaza/icon.png b/graphics/pokemon/rayquaza/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_rayquaza/icon.png rename to graphics/pokemon/rayquaza/mega/icon.png diff --git a/graphics/pokemon/mega_rayquaza/normal.pal b/graphics/pokemon/rayquaza/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_rayquaza/normal.pal rename to graphics/pokemon/rayquaza/mega/normal.pal diff --git a/graphics/pokemon/mega_rayquaza/shiny.pal b/graphics/pokemon/rayquaza/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_rayquaza/shiny.pal rename to graphics/pokemon/rayquaza/mega/shiny.pal diff --git a/graphics/pokemon/regidrago/icon.png b/graphics/pokemon/regidrago/icon.png index b6cfa5d9d..3b994684b 100644 Binary files a/graphics/pokemon/regidrago/icon.png and b/graphics/pokemon/regidrago/icon.png differ diff --git a/graphics/pokemon/regieleki/icon.png b/graphics/pokemon/regieleki/icon.png index 268208caf..bf3b3f3a8 100644 Binary files a/graphics/pokemon/regieleki/icon.png and b/graphics/pokemon/regieleki/icon.png differ diff --git a/graphics/pokemon/mega_sableye/back.png b/graphics/pokemon/sableye/mega/back.png similarity index 100% rename from graphics/pokemon/mega_sableye/back.png rename to graphics/pokemon/sableye/mega/back.png diff --git a/graphics/pokemon/mega_sableye/front.png b/graphics/pokemon/sableye/mega/front.png similarity index 100% rename from graphics/pokemon/mega_sableye/front.png rename to graphics/pokemon/sableye/mega/front.png diff --git a/graphics/pokemon/mega_sableye/icon.png b/graphics/pokemon/sableye/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_sableye/icon.png rename to graphics/pokemon/sableye/mega/icon.png diff --git a/graphics/pokemon/mega_sableye/normal.pal b/graphics/pokemon/sableye/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_sableye/normal.pal rename to graphics/pokemon/sableye/mega/normal.pal diff --git a/graphics/pokemon/mega_sableye/shiny.pal b/graphics/pokemon/sableye/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_sableye/shiny.pal rename to graphics/pokemon/sableye/mega/shiny.pal diff --git a/graphics/pokemon/mega_salamence/back.png b/graphics/pokemon/salamence/mega/back.png similarity index 100% rename from graphics/pokemon/mega_salamence/back.png rename to graphics/pokemon/salamence/mega/back.png diff --git a/graphics/pokemon/mega_salamence/front.png b/graphics/pokemon/salamence/mega/front.png similarity index 100% rename from graphics/pokemon/mega_salamence/front.png rename to graphics/pokemon/salamence/mega/front.png diff --git a/graphics/pokemon/mega_salamence/icon.png b/graphics/pokemon/salamence/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_salamence/icon.png rename to graphics/pokemon/salamence/mega/icon.png diff --git a/graphics/pokemon/mega_salamence/normal.pal b/graphics/pokemon/salamence/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_salamence/normal.pal rename to graphics/pokemon/salamence/mega/normal.pal diff --git a/graphics/pokemon/mega_salamence/shiny.pal b/graphics/pokemon/salamence/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_salamence/shiny.pal rename to graphics/pokemon/salamence/mega/shiny.pal diff --git a/graphics/pokemon/alolan_sandshrew/back.png b/graphics/pokemon/sandshrew/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/back.png rename to graphics/pokemon/sandshrew/alolan/back.png diff --git a/graphics/pokemon/alolan_sandshrew/front.png b/graphics/pokemon/sandshrew/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/front.png rename to graphics/pokemon/sandshrew/alolan/front.png diff --git a/graphics/pokemon/alolan_sandshrew/icon.png b/graphics/pokemon/sandshrew/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/icon.png rename to graphics/pokemon/sandshrew/alolan/icon.png diff --git a/graphics/pokemon/alolan_sandshrew/normal.pal b/graphics/pokemon/sandshrew/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/normal.pal rename to graphics/pokemon/sandshrew/alolan/normal.pal diff --git a/graphics/pokemon/alolan_sandshrew/shiny.pal b/graphics/pokemon/sandshrew/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandshrew/shiny.pal rename to graphics/pokemon/sandshrew/alolan/shiny.pal diff --git a/graphics/pokemon/alolan_sandslash/back.png b/graphics/pokemon/sandslash/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/back.png rename to graphics/pokemon/sandslash/alolan/back.png diff --git a/graphics/pokemon/alolan_sandslash/front.png b/graphics/pokemon/sandslash/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/front.png rename to graphics/pokemon/sandslash/alolan/front.png diff --git a/graphics/pokemon/alolan_sandslash/icon.png b/graphics/pokemon/sandslash/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/icon.png rename to graphics/pokemon/sandslash/alolan/icon.png diff --git a/graphics/pokemon/alolan_sandslash/normal.pal b/graphics/pokemon/sandslash/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/normal.pal rename to graphics/pokemon/sandslash/alolan/normal.pal diff --git a/graphics/pokemon/alolan_sandslash/shiny.pal b/graphics/pokemon/sandslash/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_sandslash/shiny.pal rename to graphics/pokemon/sandslash/alolan/shiny.pal diff --git a/graphics/pokemon/mega_sceptile/back.png b/graphics/pokemon/sceptile/mega/back.png similarity index 100% rename from graphics/pokemon/mega_sceptile/back.png rename to graphics/pokemon/sceptile/mega/back.png diff --git a/graphics/pokemon/mega_sceptile/front.png b/graphics/pokemon/sceptile/mega/front.png similarity index 100% rename from graphics/pokemon/mega_sceptile/front.png rename to graphics/pokemon/sceptile/mega/front.png diff --git a/graphics/pokemon/mega_sceptile/icon.png b/graphics/pokemon/sceptile/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_sceptile/icon.png rename to graphics/pokemon/sceptile/mega/icon.png diff --git a/graphics/pokemon/mega_sceptile/normal.pal b/graphics/pokemon/sceptile/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_sceptile/normal.pal rename to graphics/pokemon/sceptile/mega/normal.pal diff --git a/graphics/pokemon/mega_sceptile/shiny.pal b/graphics/pokemon/sceptile/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_sceptile/shiny.pal rename to graphics/pokemon/sceptile/mega/shiny.pal diff --git a/graphics/pokemon/mega_scizor/back.png b/graphics/pokemon/scizor/mega/back.png similarity index 100% rename from graphics/pokemon/mega_scizor/back.png rename to graphics/pokemon/scizor/mega/back.png diff --git a/graphics/pokemon/mega_scizor/front.png b/graphics/pokemon/scizor/mega/front.png similarity index 100% rename from graphics/pokemon/mega_scizor/front.png rename to graphics/pokemon/scizor/mega/front.png diff --git a/graphics/pokemon/scizor/mega/icon.png b/graphics/pokemon/scizor/mega/icon.png new file mode 100644 index 000000000..2ba3e8243 Binary files /dev/null and b/graphics/pokemon/scizor/mega/icon.png differ diff --git a/graphics/pokemon/mega_scizor/normal.pal b/graphics/pokemon/scizor/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_scizor/normal.pal rename to graphics/pokemon/scizor/mega/normal.pal diff --git a/graphics/pokemon/mega_scizor/shiny.pal b/graphics/pokemon/scizor/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_scizor/shiny.pal rename to graphics/pokemon/scizor/mega/shiny.pal diff --git a/graphics/pokemon/scorbunny/icon.png b/graphics/pokemon/scorbunny/icon.png index 84c83b301..9009f3e1d 100644 Binary files a/graphics/pokemon/scorbunny/icon.png and b/graphics/pokemon/scorbunny/icon.png differ diff --git a/graphics/pokemon/scyther/anim_front.png b/graphics/pokemon/scyther/anim_front.png index 60828d6f7..673dc2d22 100644 Binary files a/graphics/pokemon/scyther/anim_front.png and b/graphics/pokemon/scyther/anim_front.png differ diff --git a/graphics/pokemon/scyther/front.png b/graphics/pokemon/scyther/front.png index 125139577..abf81a063 100644 Binary files a/graphics/pokemon/scyther/front.png and b/graphics/pokemon/scyther/front.png differ diff --git a/graphics/pokemon/mega_sharpedo/back.png b/graphics/pokemon/sharpedo/mega/back.png similarity index 100% rename from graphics/pokemon/mega_sharpedo/back.png rename to graphics/pokemon/sharpedo/mega/back.png diff --git a/graphics/pokemon/mega_sharpedo/front.png b/graphics/pokemon/sharpedo/mega/front.png similarity index 100% rename from graphics/pokemon/mega_sharpedo/front.png rename to graphics/pokemon/sharpedo/mega/front.png diff --git a/graphics/pokemon/mega_sharpedo/icon.png b/graphics/pokemon/sharpedo/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_sharpedo/icon.png rename to graphics/pokemon/sharpedo/mega/icon.png diff --git a/graphics/pokemon/mega_sharpedo/normal.pal b/graphics/pokemon/sharpedo/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_sharpedo/normal.pal rename to graphics/pokemon/sharpedo/mega/normal.pal diff --git a/graphics/pokemon/mega_sharpedo/shiny.pal b/graphics/pokemon/sharpedo/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_sharpedo/shiny.pal rename to graphics/pokemon/sharpedo/mega/shiny.pal diff --git a/graphics/pokemon/mega_slowbro/back.png b/graphics/pokemon/slowbro/mega/back.png similarity index 100% rename from graphics/pokemon/mega_slowbro/back.png rename to graphics/pokemon/slowbro/mega/back.png diff --git a/graphics/pokemon/mega_slowbro/front.png b/graphics/pokemon/slowbro/mega/front.png similarity index 100% rename from graphics/pokemon/mega_slowbro/front.png rename to graphics/pokemon/slowbro/mega/front.png diff --git a/graphics/pokemon/slowbro/mega/icon.png b/graphics/pokemon/slowbro/mega/icon.png new file mode 100644 index 000000000..826f0bcce Binary files /dev/null and b/graphics/pokemon/slowbro/mega/icon.png differ diff --git a/graphics/pokemon/mega_slowbro/normal.pal b/graphics/pokemon/slowbro/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_slowbro/normal.pal rename to graphics/pokemon/slowbro/mega/normal.pal diff --git a/graphics/pokemon/mega_slowbro/shiny.pal b/graphics/pokemon/slowbro/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_slowbro/shiny.pal rename to graphics/pokemon/slowbro/mega/shiny.pal diff --git a/graphics/pokemon/mega_steelix/back.png b/graphics/pokemon/steelix/mega/back.png similarity index 100% rename from graphics/pokemon/mega_steelix/back.png rename to graphics/pokemon/steelix/mega/back.png diff --git a/graphics/pokemon/mega_steelix/front.png b/graphics/pokemon/steelix/mega/front.png similarity index 100% rename from graphics/pokemon/mega_steelix/front.png rename to graphics/pokemon/steelix/mega/front.png diff --git a/graphics/pokemon/mega_steelix/icon.png b/graphics/pokemon/steelix/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_steelix/icon.png rename to graphics/pokemon/steelix/mega/icon.png diff --git a/graphics/pokemon/mega_steelix/normal.pal b/graphics/pokemon/steelix/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_steelix/normal.pal rename to graphics/pokemon/steelix/mega/normal.pal diff --git a/graphics/pokemon/mega_steelix/shiny.pal b/graphics/pokemon/steelix/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_steelix/shiny.pal rename to graphics/pokemon/steelix/mega/shiny.pal diff --git a/graphics/pokemon/mega_swampert/back.png b/graphics/pokemon/swampert/mega/back.png similarity index 100% rename from graphics/pokemon/mega_swampert/back.png rename to graphics/pokemon/swampert/mega/back.png diff --git a/graphics/pokemon/mega_swampert/front.png b/graphics/pokemon/swampert/mega/front.png similarity index 100% rename from graphics/pokemon/mega_swampert/front.png rename to graphics/pokemon/swampert/mega/front.png diff --git a/graphics/pokemon/mega_swampert/icon.png b/graphics/pokemon/swampert/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_swampert/icon.png rename to graphics/pokemon/swampert/mega/icon.png diff --git a/graphics/pokemon/mega_swampert/normal.pal b/graphics/pokemon/swampert/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_swampert/normal.pal rename to graphics/pokemon/swampert/mega/normal.pal diff --git a/graphics/pokemon/mega_swampert/shiny.pal b/graphics/pokemon/swampert/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_swampert/shiny.pal rename to graphics/pokemon/swampert/mega/shiny.pal diff --git a/graphics/pokemon/mega_tyranitar/back.png b/graphics/pokemon/tyranitar/mega/back.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/back.png rename to graphics/pokemon/tyranitar/mega/back.png diff --git a/graphics/pokemon/mega_tyranitar/front.png b/graphics/pokemon/tyranitar/mega/front.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/front.png rename to graphics/pokemon/tyranitar/mega/front.png diff --git a/graphics/pokemon/mega_tyranitar/icon.png b/graphics/pokemon/tyranitar/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_tyranitar/icon.png rename to graphics/pokemon/tyranitar/mega/icon.png diff --git a/graphics/pokemon/mega_tyranitar/normal.pal b/graphics/pokemon/tyranitar/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_tyranitar/normal.pal rename to graphics/pokemon/tyranitar/mega/normal.pal diff --git a/graphics/pokemon/mega_tyranitar/shiny.pal b/graphics/pokemon/tyranitar/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_tyranitar/shiny.pal rename to graphics/pokemon/tyranitar/mega/shiny.pal diff --git a/graphics/pokemon/mega_venusaur/back.png b/graphics/pokemon/venusaur/mega/back.png similarity index 100% rename from graphics/pokemon/mega_venusaur/back.png rename to graphics/pokemon/venusaur/mega/back.png diff --git a/graphics/pokemon/mega_venusaur/front.png b/graphics/pokemon/venusaur/mega/front.png similarity index 100% rename from graphics/pokemon/mega_venusaur/front.png rename to graphics/pokemon/venusaur/mega/front.png diff --git a/graphics/pokemon/mega_venusaur/icon.png b/graphics/pokemon/venusaur/mega/icon.png similarity index 100% rename from graphics/pokemon/mega_venusaur/icon.png rename to graphics/pokemon/venusaur/mega/icon.png diff --git a/graphics/pokemon/mega_venusaur/normal.pal b/graphics/pokemon/venusaur/mega/normal.pal similarity index 100% rename from graphics/pokemon/mega_venusaur/normal.pal rename to graphics/pokemon/venusaur/mega/normal.pal diff --git a/graphics/pokemon/mega_venusaur/shiny.pal b/graphics/pokemon/venusaur/mega/shiny.pal similarity index 100% rename from graphics/pokemon/mega_venusaur/shiny.pal rename to graphics/pokemon/venusaur/mega/shiny.pal diff --git a/graphics/pokemon/alolan_vulpix/back.png b/graphics/pokemon/vulpix/alolan/back.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/back.png rename to graphics/pokemon/vulpix/alolan/back.png diff --git a/graphics/pokemon/alolan_vulpix/front.png b/graphics/pokemon/vulpix/alolan/front.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/front.png rename to graphics/pokemon/vulpix/alolan/front.png diff --git a/graphics/pokemon/alolan_vulpix/icon.png b/graphics/pokemon/vulpix/alolan/icon.png old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/icon.png rename to graphics/pokemon/vulpix/alolan/icon.png diff --git a/graphics/pokemon/alolan_vulpix/normal.pal b/graphics/pokemon/vulpix/alolan/normal.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/normal.pal rename to graphics/pokemon/vulpix/alolan/normal.pal diff --git a/graphics/pokemon/alolan_vulpix/shiny.pal b/graphics/pokemon/vulpix/alolan/shiny.pal old mode 100755 new mode 100644 similarity index 100% rename from graphics/pokemon/alolan_vulpix/shiny.pal rename to graphics/pokemon/vulpix/alolan/shiny.pal diff --git a/graphics/pokemon/zapdos/galarian/icon.png b/graphics/pokemon/zapdos/galarian/icon.png index df9bb29b5..2d9f031ff 100644 Binary files a/graphics/pokemon/zapdos/galarian/icon.png and b/graphics/pokemon/zapdos/galarian/icon.png differ diff --git a/include/battle.h b/include/battle.h index 931b13b2f..36ffdb6da 100644 --- a/include/battle.h +++ b/include/battle.h @@ -178,6 +178,7 @@ struct SpecialStatus u8 dancerOriginalTarget:3; u8 announceNeutralizingGas:1; // See Cmd_switchineffects u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS + u8 affectionEndured:1; s32 dmg; s32 physicalDmg; s32 specialDmg; diff --git a/include/battle_interface.h b/include/battle_interface.h index 29cb45b0f..f8f5c9d19 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -6,7 +6,8 @@ enum { HP_CURRENT, - HP_MAX + HP_MAX, + HP_BOTH }; enum @@ -72,6 +73,7 @@ enum HEALTHBOX_SAFARI_BALLS_TEXT }; +u32 WhichBattleCoords(u32 battlerId); u8 GetMegaIndicatorSpriteId(u32 healthboxSpriteId); u8 CreateBattlerHealthboxSprites(u8 battler); u8 CreateSafariPlayerHealthboxSprites(void); @@ -82,7 +84,7 @@ void DestoryHealthboxSprite(u8 healthboxSpriteId); void DummyBattleInterfaceFunc(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly); void UpdateOamPriorityInAllHealthboxes(u8 priority, bool32 hideHpBoxes); void InitBattlerHealthboxCoords(u8 battler); -void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent); +void UpdateHpTextInHealthbox(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp); void SwapHpBarsWithHpText(void); void ChangeMegaTriggerSprite(u8 spriteId, u8 animId); void CreateMegaTriggerSprite(u8 battlerId, u8 palId); diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 09e11bd8c..7e2e9a01e 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -210,6 +210,7 @@ extern const u8 BattleScript_BerryPPHealEnd2[]; extern const u8 BattleScript_ItemHealHP_End2[]; extern const u8 BattleScript_ItemHealHP_Ret[]; extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItem[]; +extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItemInPalace[]; extern const u8 BattleScript_HangedOnMsg[]; extern const u8 BattleScript_BerryConfuseHealEnd2[]; extern const u8 BattleScript_BerryConfuseHealRet[]; @@ -275,6 +276,9 @@ extern const u8 BattleScript_SnowWarningActivates[]; extern const u8 BattleScript_HarvestActivates[]; extern const u8 BattleScript_ImposterActivates[]; extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVest[]; +extern const u8 BattleScript_SelectingNotAllowedMoveAssaultVestInPalace[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholder[]; +extern const u8 BattleScript_SelectingNotAllowedPlaceholderInPalace[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravity[]; extern const u8 BattleScript_MoveUsedGravityPrevents[]; extern const u8 BattleScript_SelectingNotAllowedMoveGravityInPalace[]; @@ -301,6 +305,7 @@ extern const u8 BattleScript_DazzlingProtected[]; extern const u8 BattleScript_MoveUsedPsychicTerrainPrevents[]; extern const u8 BattleScript_MoveUsedPowder[]; extern const u8 BattleScript_SelectingNotAllowedStuffCheeks[]; +extern const u8 BattleScript_SelectingNotAllowedStuffCheeksInPalace[]; extern const u8 BattleScript_SelectingNotAllowedBelch[]; extern const u8 BattleScript_SelectingNotAllowedBelchInPalace[]; extern const u8 BattleScript_PsychicSurgeActivates[]; @@ -405,6 +410,7 @@ extern const u8 BattleScript_BlockedByPrimalWeatherRet[]; extern const u8 BattleScript_PrimalReversion[]; extern const u8 BattleScript_HyperspaceFuryRemoveProtect[]; extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTactics[]; +extern const u8 BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace[]; extern const u8 BattleScript_WanderingSpiritActivates[]; extern const u8 BattleScript_MirrorArmorReflect[]; extern const u8 BattleScript_GooeyActivates[]; @@ -420,6 +426,8 @@ extern const u8 BattleScript_MagicianActivates[]; extern const u8 BattleScript_BeakBlastSetUp[]; extern const u8 BattleScript_BeakBlastBurn[]; extern const u8 BattleScript_DefDownSpeedUp[]; +extern const u8 BattleScript_AffectionBasedStatusHeal[]; +extern const u8 BattleScript_AffectionBasedEndurance[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/battle_util.h b/include/battle_util.h index d0edbc9d1..5dbefd7e7 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -7,7 +7,17 @@ #define MOVE_LIMITATION_TORMENTED (1 << 3) #define MOVE_LIMITATION_TAUNT (1 << 4) #define MOVE_LIMITATION_IMPRISON (1 << 5) -#define MOVE_LIMITATIONS_ALL 0xFF +#define MOVE_LIMITATION_ENCORE (1 << 6) +#define MOVE_LIMITATION_CHOICE_ITEM (1 << 7) +#define MOVE_LIMITATION_ASSAULT_VEST (1 << 8) +#define MOVE_LIMITATION_GRAVITY (1 << 9) +#define MOVE_LIMITATION_HEAL_BLOCK (1 << 10) +#define MOVE_LIMITATION_BELCH (1 << 11) +#define MOVE_LIMITATION_THROAT_CHOP (1 << 12) +#define MOVE_LIMITATION_STUFF_CHEEKS (1 << 13) + +#define MOVE_LIMITATION_PLACEHOLDER (1 << 15) +#define MOVE_LIMITATIONS_ALL 0xFFFF #define ABILITYEFFECT_ON_SWITCHIN 0 #define ABILITYEFFECT_ENDTURN 1 @@ -89,7 +99,7 @@ void BattleScriptPush(const u8 *bsPtr); void BattleScriptPushCursor(void); void BattleScriptPop(void); u8 TrySetCantSelectMoveBattleScript(void); -u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check); +u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check); bool8 AreAllMovesUnusable(void); u8 GetImprisonedMovesCount(u8 battlerId, u16 move); u8 DoFieldEndTurnEffects(void); @@ -191,5 +201,6 @@ bool32 CanBeParalyzed(u8 battlerId); bool32 CanBeFrozen(u8 battlerId); bool32 CanBeConfused(u8 battlerId); bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag); +u32 GetMonFriendshipScore(struct Pokemon *pokemon); #endif // GUARD_BATTLE_UTIL_H diff --git a/include/config.h b/include/config.h index 5f2fa4d2c..d4a71c076 100644 --- a/include/config.h +++ b/include/config.h @@ -26,7 +26,7 @@ #endif // Uncomment to fix some identified minor bugs -//#define BUGFIX +#define BUGFIX // Various undefined behavior bugs may or may not prevent compilation with // newer compilers. So always fix them when using a modern compiler. @@ -36,4 +36,12 @@ #endif #endif +// Compatibility definition for other projects to detect pokeemerald-expansion +#define RHH_EXPANSION + +// Legacy branch-based defines included for backwards compatibility +#define BATTLE_ENGINE +#define POKEMON_EXPANSION +#define ITEM_EXPANSION + #endif // GUARD_CONFIG_H diff --git a/include/constants/battle.h b/include/constants/battle.h index 37b9a637a..5cffb74ab 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -81,7 +81,7 @@ #define WILD_DOUBLE_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER)))) #define BATTLE_TWO_VS_ONE_OPPONENT ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gTrainerBattleOpponent_B == 0xFFFF)) -#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER) +#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER | BATTLE_TYPE_INGAME_PARTNER) // Battle Outcome defines @@ -250,16 +250,17 @@ #define STATUS_FIELD_TERRAIN_ANY (STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN) // Flags describing move's result -#define MOVE_RESULT_MISSED (1 << 0) -#define MOVE_RESULT_SUPER_EFFECTIVE (1 << 1) -#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2) -#define MOVE_RESULT_DOESNT_AFFECT_FOE (1 << 3) -#define MOVE_RESULT_ONE_HIT_KO (1 << 4) -#define MOVE_RESULT_FAILED (1 << 5) -#define MOVE_RESULT_FOE_ENDURED (1 << 6) -#define MOVE_RESULT_FOE_HUNG_ON (1 << 7) -#define MOVE_RESULT_STURDIED (1 << 8) -#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) +#define MOVE_RESULT_MISSED (1 << 0) +#define MOVE_RESULT_SUPER_EFFECTIVE (1 << 1) +#define MOVE_RESULT_NOT_VERY_EFFECTIVE (1 << 2) +#define MOVE_RESULT_DOESNT_AFFECT_FOE (1 << 3) +#define MOVE_RESULT_ONE_HIT_KO (1 << 4) +#define MOVE_RESULT_FAILED (1 << 5) +#define MOVE_RESULT_FOE_ENDURED (1 << 6) +#define MOVE_RESULT_FOE_HUNG_ON (1 << 7) +#define MOVE_RESULT_STURDIED (1 << 8) +#define MOVE_RESULT_FOE_ENDURED_AFFECTION (1 << 9) +#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) // Battle Weather flags #define B_WEATHER_RAIN_TEMPORARY (1 << 0) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index d15b6876e..28bcb283d 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -536,6 +536,7 @@ #define B_ANIM_BEAK_BLAST_SETUP 33 #define B_ANIM_SHELL_TRAP_SETUP 34 #define B_ANIM_ZMOVE_ACTIVATE 35 // Using Z Moves +#define B_ANIM_AFFECTION_HANGED_ON 36 // special animations table (gBattleAnims_Special) #define B_ANIM_LVL_UP 0 diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 6faff8122..d85f5e437 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_BATTLE_CONFIG_H #define GUARD_CONSTANTS_BATTLE_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 @@ -176,6 +174,7 @@ #define B_MULTI_BATTLE_WHITEOUT GEN_8 // In Gen4+, multi battles end when the Player and also their Partner don't have any more Pokémon to fight. #define B_EVOLUTION_AFTER_WHITEOUT GEN_6 // In Gen6+, Pokemon that qualify for evolution after battle will evolve even if the player loses. #define B_WILD_NATURAL_ENEMIES TRUE // If set to TRUE, certain wild mon species will attack other species when partnered in double wild battles (eg. Zangoose vs Seviper) +#define B_AFFECTION_MECHANICS FALSE // In Gen6+, there's a stat called affection that can trigger different effects in battle. From LGPE onwards, those effects use friendship instead. // Animation Settings #define B_NEW_SWORD_PARTICLE FALSE // If set to TRUE, it updates Swords Dance's particle. diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 39092410a..4ef2a3a82 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -624,8 +624,14 @@ #define STRINGID_ZMOVESTATUP 622 #define STRINGID_ZMOVEHPTRAP 623 #define STRINGID_TERRAINREMOVED 624 +#define STRINGID_ATTACKEREXPELLEDTHEPOISON 625 +#define STRINGID_ATTACKERSHOOKITSELFAWAKE 626 +#define STRINGID_ATTACKERBROKETHROUGHPARALYSIS 627 +#define STRINGID_ATTACKERHEALEDITSBURN 628 +#define STRINGID_ATTACKERMELTEDTHEICE 629 +#define STRINGID_TARGETTOUGHEDITOUT 630 -#define BATTLESTRINGS_COUNT 625 +#define BATTLESTRINGS_COUNT 631 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/include/constants/expansion_branches.h b/include/constants/expansion_branches.h deleted file mode 100644 index 48af6bf1b..000000000 --- a/include/constants/expansion_branches.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GUARD_CONSTANTS_EXPANSION_BRANCHES_H -#define GUARD_CONSTANTS_EXPANSION_BRANCHES_H - -// Branch defines: Used by other branches to detect each other. -// Each define must be here for each of RHH's branch you have pulled. -// e.g. If you have both the battle_engine and pokemon_expansion branch, -// then both BATTLE_ENGINE and POKEMON_EXPANSION must be defined here. -#define BATTLE_ENGINE -#define POKEMON_EXPANSION -#define ITEM_EXPANSION - -#endif diff --git a/include/constants/item_config.h b/include/constants/item_config.h index 01b5fa358..70b4440c8 100644 --- a/include/constants/item_config.h +++ b/include/constants/item_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_ITEM_CONFIG_H #define GUARD_CONSTANTS_ITEM_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 diff --git a/include/constants/items.h b/include/constants/items.h index 5413a7afe..1448bf591 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -973,6 +973,13 @@ #define MACH_BIKE 0 #define ACRO_BIKE 1 +// Item parameters for EXP Candies +#define EXP_100 1 +#define EXP_800 2 +#define EXP_3000 3 +#define EXP_10000 4 +#define EXP_30000 5 + // Item type IDs (used to determine the exit callback) #define ITEM_USE_MAIL 0 #define ITEM_USE_PARTY_MENU 1 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 14a037f9f..98075a942 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -182,6 +182,15 @@ #define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7 #define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint +// Constants for GetLeadMonFriendshipScore +#define FRIENDSHIP_NONE 0 +#define FRIENDSHIP_1_TO_49 1 +#define FRIENDSHIP_50_TO_99 2 +#define FRIENDSHIP_100_TO_149 3 +#define FRIENDSHIP_150_TO_199 4 +#define FRIENDSHIP_200_TO_254 5 +#define FRIENDSHIP_MAX 6 + #define MAX_FRIENDSHIP 255 #define MAX_SHEEN 255 #define MAX_CONDITION 255 diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 077c02e33..879b75564 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_POKEMON_CONFIG_H #define GUARD_CONSTANTS_POKEMON_CONFIG_H -#include "constants/expansion_branches.h" - #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 @@ -14,7 +12,7 @@ #define P_UPDATED_TYPES GEN_8 // Since Gen 6, several Pokémon were changed to be partially or fully Fairy type. #define P_UPDATED_STATS GEN_8 // Since Gen 6, Pokémon stats are updated with each passing generation. -#define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities. +#define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. #define P_LEGENDARY_PERFECT_IVS GEN_8 // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. diff --git a/include/decompress.h b/include/decompress.h index bea2788ab..ef2ec43b0 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -19,10 +19,9 @@ bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species); void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality); -void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); -void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale); +void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality); -void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); +void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic); u32 GetDecompressedDataSize(const u32 *ptr); diff --git a/include/global.h b/include/global.h index 25b43db20..b27c1e91c 100644 --- a/include/global.h +++ b/include/global.h @@ -15,7 +15,6 @@ #include "constants/pokemon.h" #include "constants/easy_chat.h" #include "constants/trainer_hill.h" -#include "constants/expansion_branches.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); diff --git a/include/pokemon.h b/include/pokemon.h index d7de38c61..c05628a59 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -558,5 +558,6 @@ u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId); u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg); u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove); +bool32 ShouldShowFemaleDifferences(u16 species, u32 personality); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 952db1ed1..fba6a6740 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -21,7 +21,6 @@ u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s1 void FreeMonIconPalette(u16 species); void FreeAndDestroyMonIconSprite(struct Sprite *sprite); u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality); -u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny); u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void SpriteCB_MonIcon(struct Sprite *sprite); diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 3996c8e15..4e9e62284 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -6,6 +6,7 @@ extern u8 gLastViewedMonIndex; extern const u8 *const gMoveDescriptionPointers[]; +extern const u8 gNotDoneYetDescription[]; extern const u8 *const gNatureNamePointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); diff --git a/include/strings.h b/include/strings.h index e2ae613d0..25a96eef0 100644 --- a/include/strings.h +++ b/include/strings.h @@ -499,6 +499,7 @@ extern const u8 gText_12PoofForgotMove[]; extern const u8 gText_StopLearningMove2[]; extern const u8 gText_MoveNotLearned[]; extern const u8 gText_PkmnElevatedToLvVar2[]; +extern const u8 gText_PkmnGainedExp[]; extern const u8 gText_RemoveMailBeforeItem[]; extern const u8 gText_PkmnHoldingItemCantHoldMail[]; extern const u8 gText_MailTransferredFromMailbox[]; diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index dc5fd413d..9cfb30721 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -130,10 +130,10 @@ static u32 GetWildAiFlags(void) { u8 avgLevel = GetMonData(&gEnemyParty[0], MON_DATA_LEVEL); u32 flags; - + if (IsDoubleBattle()) avgLevel = (GetMonData(&gEnemyParty[0], MON_DATA_LEVEL) + GetMonData(&gEnemyParty[1], MON_DATA_LEVEL)) / 2; - + flags |= AI_FLAG_CHECK_BAD_MOVE; if (avgLevel >= 20) flags |= AI_FLAG_CHECK_VIABILITY; @@ -146,7 +146,7 @@ static u32 GetWildAiFlags(void) if (VarGet(B_VAR_WILD_AI_FLAGS) != 0) flags |= VarGet(B_VAR_WILD_AI_FLAGS); #endif - + return flags; } @@ -168,7 +168,7 @@ void BattleAI_SetupFlags(void) AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags | gTrainers[gTrainerBattleOpponent_B].aiFlags; else AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags; - + // check smart wild AI if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER)) && IsWildMonSmart()) AI_THINKING_STRUCT->aiFlags |= GetWildAiFlags(); @@ -222,11 +222,11 @@ u8 BattleAI_ChooseMoveOrAction(void) ret = ChooseMoveOrAction_Singles(); else ret = ChooseMoveOrAction_Doubles(); - + // Clear protect structures, some flags may be set during AI calcs // e.g. pranksterElevated from GetMovePriority memset(&gProtectStructs, 0, MAX_BATTLERS_COUNT * sizeof(struct ProtectStruct)); - + gCurrentMove = savedCurrentMove; return ret; } @@ -247,7 +247,7 @@ static void SetBattlerAiData(u8 battlerId) AI_DATA->holdEffectParams[battlerId] = GetBattlerHoldEffectParam(battlerId); AI_DATA->predictedMoves[battlerId] = gLastMoves[battlerId]; AI_DATA->hpPercents[battlerId] = GetHealthPercentage(battlerId); - AI_DATA->moveLimitations[battlerId] = CheckMoveLimitations(battlerId, 0, 0xFF); + AI_DATA->moveLimitations[battlerId] = CheckMoveLimitations(battlerId, 0, MOVE_LIMITATIONS_ALL); } void GetAiLogicData(void) @@ -255,13 +255,13 @@ void GetAiLogicData(void) u32 battlerAtk, battlerDef, i, move; u8 effectiveness; s32 dmg; - + memset(AI_DATA, 0, sizeof(struct AiLogicData)); - + if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER)) && !IsWildMonSmart()) return; - + // get/assume all battler data for (i = 0; i < gBattlersCount; i++) { @@ -269,7 +269,7 @@ void GetAiLogicData(void) SetBattlerAiData(i); } } - + // simulate AI damage for (battlerAtk = 0; battlerAtk < gBattlersCount; battlerAtk++) { @@ -277,26 +277,26 @@ void GetAiLogicData(void) || !IsBattlerAIControlled(battlerAtk)) { continue; } - + for (battlerDef = 0; battlerDef < gBattlersCount; battlerDef++) { if (battlerAtk == battlerDef) continue; - + RecordKnownMove(battlerDef, gLastMoves[battlerDef]); for (i = 0; i < MAX_MON_MOVES; i++) { dmg = 0; effectiveness = AI_EFFECTIVENESS_x0; move = gBattleMons[battlerAtk].moves[i]; - + if (move != 0 && move != 0xFFFF //&& gBattleMoves[move].power != 0 /* we want to get effectiveness of status moves */ && !(AI_DATA->moveLimitations[battlerAtk] & gBitTable[i])) { dmg = AI_CalcDamage(move, battlerAtk, battlerDef, &effectiveness, TRUE); } - + AI_DATA->simulatedDmg[battlerAtk][battlerDef][i] = dmg; AI_DATA->effectiveness[battlerAtk][battlerDef][i] = effectiveness; } @@ -336,7 +336,7 @@ static u8 ChooseMoveOrAction_Singles(void) return AI_CHOICE_WATCH; gActiveBattler = sBattler_AI; - + // If can switch. if (CountUsablePartyMons(sBattler_AI) > 0 && !IsAbilityPreventingEscape(sBattler_AI) @@ -377,7 +377,7 @@ static u8 ChooseMoveOrAction_Singles(void) } } } - + numOfBestMoves = 1; currentMoveArray[0] = AI_THINKING_STRUCT->score[0]; consideredMoveArray[0] = 0; @@ -429,7 +429,7 @@ static u8 ChooseMoveOrAction_Doubles(void) BattleAI_SetupAIData(gBattleStruct->palaceFlags >> 4); else BattleAI_SetupAIData(0xF); - + gBattlerTarget = i; if ((i & BIT_SIDE) != (sBattler_AI & BIT_SIDE)) RecordLastUsedMoveByTarget(); @@ -469,7 +469,7 @@ static u8 ChooseMoveOrAction_Doubles(void) { if (!CanTargetBattler(sBattler_AI, i, gBattleMons[sBattler_AI].moves[j])) continue; - + if (mostViableMovesScores[0] == AI_THINKING_STRUCT->score[j]) { mostViableMovesScores[mostViableMovesNo] = AI_THINKING_STRUCT->score[j]; @@ -588,7 +588,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) bool32 isDoubleBattle = IsValidDoubleBattle(battlerAtk); u32 i; u16 predictedMove = AI_DATA->predictedMoves[battlerDef]; - + SetTypeBeforeUsingMove(move, battlerAtk); GET_MOVE_TYPE(move, moveType); @@ -596,7 +596,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) return score; GET_MOVE_TYPE(move, moveType); - + // check non-user target if (!(moveTarget & MOVE_TARGET_USER)) { @@ -606,7 +606,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_MINUS(20); } - + // check ground immunities if (moveType == TYPE_GROUND && !IsBattlerGrounded(battlerDef) @@ -618,11 +618,11 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_MINUS(20); } - + // check off screen if (IsSemiInvulnerable(battlerDef, move) && moveEffect != EFFECT_SEMI_INVULNERABLE && AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_FASTER) RETURN_SCORE_MINUS(20); // if target off screen and we go first, don't use move - + // check if negates type switch (effectiveness) { @@ -634,7 +634,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_MINUS(10); break; } - + // target ability checks if (!DoesBattlerIgnoreAbilityChecks(AI_DATA->abilities[battlerAtk], move)) { @@ -760,7 +760,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) RETURN_SCORE_MINUS(10); break; } // def ability checks - + // target partner ability checks & not attacking partner if (isDoubleBattle) { @@ -798,35 +798,35 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } // def partner ability checks } // ignore def ability check - + // gen7+ dark type mons immune to priority->elevated moves from prankster #if B_PRANKSTER_DARK_TYPES >= GEN_7 if (AI_DATA->abilities[battlerAtk] == ABILITY_PRANKSTER && IS_BATTLER_OF_TYPE(battlerDef, TYPE_DARK) && IS_MOVE_STATUS(move) && !(moveTarget & (MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER))) RETURN_SCORE_MINUS(10); #endif - + // terrain & effect checks if (AI_IsTerrainAffected(battlerDef, STATUS_FIELD_ELECTRIC_TERRAIN)) { if (moveEffect == EFFECT_SLEEP || moveEffect == EFFECT_YAWN) RETURN_SCORE_MINUS(20); } - + if (AI_IsTerrainAffected(battlerDef, STATUS_FIELD_MISTY_TERRAIN)) { if (IsNonVolatileStatusMoveEffect(moveEffect) || IsConfusionMoveEffect(moveEffect)) RETURN_SCORE_MINUS(20); } - + if (AI_IsTerrainAffected(battlerAtk, STATUS_FIELD_PSYCHIC_TERRAIN) && atkPriority > 0) { RETURN_SCORE_MINUS(20); } } // end check MOVE_TARGET_USER - + // the following checks apply to any target (including user) - + // throat chop check if (gDisableStructs[battlerAtk].throatChopTimer && TestMoveFlags(move, FLAG_SOUND)) return 0; // Can't even select move at all @@ -862,7 +862,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } } - + // check move effects switch (moveEffect) { @@ -876,7 +876,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_EXPLOSION: if (!(AI_THINKING_STRUCT->aiFlags & AI_FLAG_WILL_SUICIDE)) score -= 2; - + if (effectiveness == AI_EFFECTIVENESS_x0) { score -= 10; @@ -922,7 +922,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPATK) || !HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) score -= 10; break; - case EFFECT_SPECIAL_DEFENSE_UP: + case EFFECT_SPECIAL_DEFENSE_UP: case EFFECT_SPECIAL_DEFENSE_UP_2: if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF)) score -= 10; @@ -1232,7 +1232,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_LOW_KICK: // AI_CBM_HighRiskForDamage if (AI_DATA->abilities[battlerDef] == ABILITY_WONDER_GUARD && effectiveness < AI_EFFECTIVENESS_x2) - score -= 10; + score -= 10; break; case EFFECT_COUNTER: case EFFECT_MIRROR_COAT: @@ -1242,7 +1242,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || DoesSubstituteBlockMove(battlerAtk, BATTLE_PARTNER(battlerDef), predictedMove)) score -= 10; break; - + case EFFECT_ROAR: if (CountUsablePartyMons(battlerDef) == 0) score -= 10; @@ -1400,7 +1400,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SPIKES: if (gSideTimers[GetBattlerSide(battlerDef)].spikesAmount >= 3) score -= 10; - else if (PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) + else if (PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove) && gSideTimers[GetBattlerSide(battlerDef)].spikesAmount == 2) score -= 10; // only one mon needs to set up the last layer of Spikes break; @@ -1811,7 +1811,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp > (gBattleMons[battlerAtk].hp + gBattleMons[battlerDef].hp) / 2) score -= 10; break; - + case EFFECT_CONVERSION_2: //TODO break; @@ -1871,7 +1871,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // move check - + if (decreased) break; if (IsBattlerIncapacitated(battlerDef, AI_DATA->abilities[battlerDef])) @@ -1913,7 +1913,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) IncreaseAllyProtectionViability(&viability, 0xFF); }*/ } - break; + break; case EFFECT_MIRACLE_EYE: if (gStatuses3[battlerDef] & STATUS3_MIRACLE_EYED) score -= 10; @@ -1961,7 +1961,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || ((AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) && !IsTargetingPartner(battlerAtk, battlerDef))) // don't want to raise target stats unless its your partner score -= 10; break; - + case EFFECT_PSYCH_UP: // haze stats check { for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) @@ -2125,7 +2125,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) u32 atkNegativeStages = CountNegativeStatStages(battlerAtk); u32 defPositiveStages = CountPositiveStatStages(battlerDef); u32 defNegativeStages = CountNegativeStatStages(battlerDef); - + if (atkPositiveStages >= defPositiveStages && atkNegativeStages <= defNegativeStages) score -= 10; break; @@ -2521,22 +2521,24 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gBattleMons[battlerAtk].hp <= gBattleMons[battlerAtk].maxHP / 3) score -= 10; break;*/ + case EFFECT_PLACEHOLDER: + return 0; // cannot even select } // move effect checks - + if (score < 0) score = 0; - + return score; } static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) -{ +{ if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (gBattleMoves[move].power == 0) return score; // can't make anything faint with no power - + if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION) { // this move can faint the target @@ -2550,10 +2552,10 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // this move isn't expected to faint the target if (TestMoveFlags(move, FLAG_HIGH_CRIT)) score += 2; // crit makes it more likely to make them faint - + if (GetMoveDamageResult(move) == MOVE_POWER_OTHER) score--; - + switch (AI_DATA->effectiveness[battlerAtk][battlerDef][AI_THINKING_STRUCT->movesetIndex]) { case AI_EFFECTIVENESS_x8: @@ -2570,7 +2572,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + //AI_TryToFaint_CheckIfDanger if (!WillAIStrikeFirst() && CanTargetFaintAi(battlerDef, battlerAtk)) { // AI_TryToFaint_Danger @@ -2579,7 +2581,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else score++; } - + return score; } @@ -2635,8 +2637,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } // check partner move effect - - + + // consider our move effect relative to partner state switch (effect) { @@ -2657,8 +2659,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // our effect relative to partner - - + + // consider global move effects switch (effect) { @@ -2688,8 +2690,8 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } break; } // global move effect check - - + + // check specific target if (IsTargetingPartner(battlerAtk, battlerDef)) { @@ -2796,11 +2798,11 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { RETURN_SCORE_PLUS(1); } - break; + break; } } // ability checks } // move power check - + // attacker move effects specifically targeting partner if (!partnerProtecting) { @@ -2913,12 +2915,12 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } // attacker move effects } // check partner protecting - + score -= 30; // otherwise, don't target partner } else // checking opponent { - // these checks mostly handled in AI_CheckBadMove and AI_CheckViability + // these checks mostly handled in AI_CheckBadMove and AI_CheckViability switch (effect) { case EFFECT_SKILL_SWAP: @@ -2943,10 +2945,10 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 3; break; } - + // lightning rod, flash fire against enemy handled in AI_CheckBadMove } - + return score; } @@ -2983,11 +2985,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) u16 predictedMove = AI_DATA->predictedMoves[battlerDef]; bool32 isDoubleBattle = IsValidDoubleBattle(battlerAtk); u32 i; - + // Targeting partner, check benefits of doing that instead if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + // check always hits if (!IS_MOVE_STATUS(move) && gBattleMoves[move].accuracy == 0) { @@ -2996,11 +2998,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (AI_RandLessThan(100) && (gBattleMons[battlerDef].statStages[STAT_EVASION] >= 8 || gBattleMons[battlerAtk].statStages[STAT_ACC] <= 4)) score++; } - + // check high crit if (TestMoveFlags(move, FLAG_HIGH_CRIT) && effectiveness >= AI_EFFECTIVENESS_x2 && AI_RandLessThan(128)) score++; - + // check already dead if (!IsBattlerIncapacitated(battlerDef, AI_DATA->abilities[battlerDef]) && CanTargetFaintAi(battlerAtk, battlerDef) @@ -3011,7 +3013,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else score--; } - + // check damage if (gBattleMoves[move].power != 0 && GetMoveDamageResult(move) == MOVE_POWER_WEAK) score--; @@ -3019,11 +3021,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // check status move preference if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_PREFER_STATUS_MOVES && IS_MOVE_STATUS(move) && effectiveness != AI_EFFECTIVENESS_x0) score++; - + // check thawing moves if ((gBattleMons[battlerAtk].status1 & STATUS1_FREEZE) && TestMoveFlags(move, FLAG_THAW_USER)) score += (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) ? 20 : 10; - + // check burn if (gBattleMons[battlerAtk].status1 & STATUS1_BURN) { @@ -3042,7 +3044,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + // attacker ability checks switch (AI_DATA->abilities[battlerAtk]) { @@ -3058,8 +3060,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 8; // prioritize killing target for stat boost } break; - } // ability checks - + } // ability checks + // move effect checks switch (moveEffect) { @@ -3104,7 +3106,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + if (!AI_RandLessThan(100)) { score--; @@ -3150,7 +3152,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) break; } } - + if (!AI_RandLessThan(100)) { score--; @@ -3173,7 +3175,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 2; else if (AI_DATA->hpPercents[battlerAtk] <= 70) score -= 2; - else + else score++; break; case EFFECT_EVASION_UP: @@ -3303,7 +3305,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_ATTACK_SPATK_UP: // work up if (AI_DATA->hpPercents[battlerAtk] <= 40 || AI_DATA->abilities[battlerAtk] == ABILITY_CONTRARY) break; - + if (HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL)) IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score); else if (HasMoveWithSplit(battlerAtk, SPLIT_SPECIAL)) @@ -3359,7 +3361,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + if (ShouldRecover(battlerAtk, battlerDef, move, healPercent)) score += 2; } @@ -3593,7 +3595,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (newHp > healthBenchmark && ShouldAbsorb(battlerAtk, battlerDef, move, AI_DATA->simulatedDmg[battlerAtk][battlerDef][AI_THINKING_STRUCT->movesetIndex])) score += 2; } - break; + break; case EFFECT_SLEEP_TALK: case EFFECT_SNORE: if (!IsWakeupTurn(battlerAtk) && gBattleMons[battlerAtk].status1 & STATUS1_SLEEP) @@ -3628,13 +3630,13 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_THIEF: { bool32 canSteal = FALSE; - + #if B_TRAINERS_KNOCK_OFF_ITEMS == TRUE canSteal = TRUE; #endif if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER || GetBattlerSide(battlerAtk) == B_SIDE_PLAYER) canSteal = TRUE; - + if (canSteal && AI_DATA->items[battlerAtk] == ITEM_NONE && AI_DATA->items[battlerDef] != ITEM_NONE && CanBattlerGetOrLoseItem(battlerDef, AI_DATA->items[battlerDef]) @@ -3778,8 +3780,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (AI_DATA->abilities[battlerDef] == ABILITY_MAGIC_BOUNCE || CountUsablePartyMons(battlerDef) == 0) break; if (gDisableStructs[battlerAtk].isFirstTurn) - score += 2; - //TODO - track entire opponent party data to determine hazard effectiveness + score += 2; + //TODO - track entire opponent party data to determine hazard effectiveness break; case EFFECT_FORESIGHT: if (AI_DATA->abilities[battlerAtk] == ABILITY_SCRAPPY) @@ -3808,7 +3810,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (HasMoveEffect(battlerDef, EFFECT_MORNING_SUN) || HasMoveEffect(battlerDef, EFFECT_SYNTHESIS) || HasMoveEffect(battlerDef, EFFECT_MOONLIGHT)) - score += 2; + score += 2; } break; case EFFECT_HAIL: @@ -3817,7 +3819,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if ((HasMoveEffect(battlerAtk, EFFECT_AURORA_VEIL) || HasMoveEffect(BATTLE_PARTNER(battlerAtk), EFFECT_AURORA_VEIL)) && ShouldSetScreen(battlerAtk, battlerDef, EFFECT_AURORA_VEIL)) score += 3; - + score++; if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_ICY_ROCK) score++; @@ -3876,7 +3878,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SPECTRAL_THIEF: // Want to copy positive stat changes for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) - { + { if (gBattleMons[battlerDef].statStages[i] > gBattleMons[battlerAtk].statStages[i]) { switch (i) @@ -3935,7 +3937,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (HasMoveEffect(battlerAtk, EFFECT_SWALLOW) || HasMoveEffect(battlerAtk, EFFECT_SPIT_UP)) score += 2; - + IncreaseStatUpScore(battlerAtk, battlerDef, STAT_DEF, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score); break; @@ -3952,20 +3954,20 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) || HasMoveEffect(battlerAtk, EFFECT_PSYCH_UP) || HasMoveEffect(battlerAtk, EFFECT_SPECTRAL_THIEF)) score++; - + if (AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) score += 2; - + IncreaseConfusionScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_FLATTER: if (HasMoveEffect(battlerAtk, EFFECT_PSYCH_UP) || HasMoveEffect(battlerAtk, EFFECT_SPECTRAL_THIEF)) score += 2; - + if (AI_DATA->abilities[battlerDef] == ABILITY_CONTRARY) score += 2; - + IncreaseConfusionScore(battlerAtk, battlerDef, move, &score); break; case EFFECT_FURY_CUTTER: @@ -4006,7 +4008,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score += 3; break; } - + switch (move) { case MOVE_DEFOG: @@ -4022,7 +4024,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) && AI_WhoStrikesFirst(battlerAtk, BATTLE_PARTNER(battlerAtk), move) == AI_IS_SLOWER) // Partner going first break; // Don't use Defog if partner is going to set up hazards } - + // check defog lowering evasion if (ShouldLowerEvasion(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef])) { @@ -4194,10 +4196,10 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { u16 item = GetUsedHeldItem(battlerAtk); u16 toHeal = (ItemId_GetHoldEffectParam(item) == 10) ? 10 : gBattleMons[battlerAtk].maxHP / ItemId_GetHoldEffectParam(item); - + if (IsStatBoostingBerry(item) && AI_DATA->hpPercents[battlerAtk] > 60) score++; - else if (ShouldRestoreHpBerry(battlerAtk, item) && !CanAIFaintTarget(battlerAtk, battlerDef, 0) + else if (ShouldRestoreHpBerry(battlerAtk, item) && !CanAIFaintTarget(battlerAtk, battlerDef, 0) && ((GetWhoStrikesFirst(battlerAtk, battlerDef, TRUE) == 0 && CanTargetFaintAiWithMod(battlerDef, battlerAtk, 0, 0)) || !CanTargetFaintAiWithMod(battlerDef, battlerAtk, toHeal, 0))) score++; // Recycle healing berry if we can't otherwise faint the target and the target wont kill us after we activate the berry @@ -4244,7 +4246,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (AI_DATA->abilities[battlerDef] != AI_DATA->abilities[battlerAtk] && !(gStatuses3[battlerDef] & STATUS3_GASTRO_ACID)) score += 2; - } + } break; case EFFECT_IMPRISON: if (predictedMove != MOVE_NONE && HasMove(battlerAtk, predictedMove)) @@ -4315,7 +4317,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) case EFFECT_SHELL_SMASH: if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_RESTORE_STATS) score += 1; - + IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPEED, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPATK, &score); IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score); @@ -4422,7 +4424,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gStatuses3[battlerAtk] & STATUS3_YAWN && IsBattlerGrounded(battlerAtk)) score += 10; //fallthrough - case EFFECT_GRASSY_TERRAIN: + case EFFECT_GRASSY_TERRAIN: case EFFECT_PSYCHIC_TERRAIN: score += 2; if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_TERRAIN_EXTENDER) @@ -4695,7 +4697,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) //case EFFECT_SKY_DROP //break; } // move effect checks - + return score; } @@ -4705,15 +4707,15 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (IsTargetingPartner(battlerAtk, battlerDef) || gBattleResults.battleTurnCounter != 0) return score; - - if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING + + if (AI_THINKING_STRUCT->aiFlags & AI_FLAG_SMART_SWITCHING && AI_WhoStrikesFirst(battlerAtk, battlerDef, move) == AI_IS_SLOWER && CanTargetFaintAi(battlerDef, battlerAtk) && GetMovePriority(battlerAtk, move) == 0) { RETURN_SCORE_MINUS(20); // No point in setting up if you will faint. Should just switch if possible.. } - + // check effects to prioritize first turn switch (gBattleMoves[move].effect) { @@ -4802,7 +4804,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + return score; } @@ -4811,10 +4813,10 @@ static s16 AI_Risky(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (TestMoveFlags(move, FLAG_HIGH_CRIT)) score += 2; - + switch (gBattleMoves[move].effect) { case EFFECT_SLEEP: @@ -4841,7 +4843,7 @@ static s16 AI_Risky(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) default: break; } - + return score; } @@ -4850,10 +4852,10 @@ static s16 AI_PreferStrongestMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 sc { if (IsTargetingPartner(battlerAtk, battlerDef)) return score; - + if (GetMoveDamageResult(move) == MOVE_POWER_BEST) score += 2; - + return score; } @@ -4861,14 +4863,14 @@ static s16 AI_PreferStrongestMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 sc static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { u32 i; - + if (IsTargetingPartner(battlerAtk, battlerDef) || CountUsablePartyMons(battlerAtk) == 0 || GetMoveDamageResult(move) != MOVE_POWER_OTHER || !HasMoveEffect(battlerAtk, EFFECT_BATON_PASS) || IsBattlerTrapped(battlerAtk, TRUE)) return score; - + if (IsStatRaisingEffect(gBattleMoves[move].effect)) { if (gBattleResults.battleTurnCounter == 0) @@ -4876,9 +4878,9 @@ static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) else if (AI_DATA->hpPercents[battlerAtk] < 60) score -= 10; else - score++; + score++; } - + // other specific checks switch (gBattleMoves[move].effect) { @@ -4904,12 +4906,12 @@ static s16 AI_PreferBatonPass(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) if (gStatuses3[battlerAtk] & (STATUS3_ROOTED | STATUS3_AQUA_RING)) score += 2; if (gStatuses3[battlerAtk] & STATUS3_LEECHSEED) - score -= 3; + score -= 3; break; default: break; } - + return score; } @@ -4929,11 +4931,11 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (gStatuses3[battlerDef] & STATUS3_HEAL_BLOCK) return 0; - + if (CanTargetFaintAi(FOE(battlerAtk), BATTLE_PARTNER(battlerAtk)) || (CanTargetFaintAi(BATTLE_PARTNER(FOE(battlerAtk)), BATTLE_PARTNER(battlerAtk)))) score--; - + if (AI_DATA->hpPercents[battlerDef] <= 50) score++; } @@ -4972,7 +4974,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // med hp if (IsStatRaisingEffect(effect) || IsStatLoweringEffect(effect)) score -= 2; - + switch (effect) { case EFFECT_EXPLOSION: @@ -4995,7 +4997,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) // low hp if (IsStatRaisingEffect(effect) || IsStatLoweringEffect(effect)) score -= 2; - + // check other discouraged low hp effects switch (effect) { @@ -5028,7 +5030,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) } } } - + // consider target HP if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0)) { @@ -5100,7 +5102,7 @@ static s16 AI_HPAware(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) score -= 2; // don't use status moves if target is at low health } } - + return score; } @@ -5119,7 +5121,7 @@ static s16 AI_Roaming(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) { if (IsBattlerTrapped(battlerAtk, FALSE)) return score; - + AI_Flee(); return score; } diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 13cc82824..e29970cdf 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -154,7 +154,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) return FALSE; if (gLastLandedMoves[gActiveBattler] == MOVE_UNAVAILABLE) return FALSE; - if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) + if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler])) return FALSE; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) @@ -245,8 +245,7 @@ static bool8 ShouldSwitchIfNaturalCure(void) BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } - else if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0 - && Random() & 1) + else if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler]) && Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); @@ -350,7 +349,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent) return FALSE; if (gLastHitBy[gActiveBattler] == 0xFF) return FALSE; - if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) + if (IS_MOVE_STATUS(gLastLandedMoves[gActiveBattler])) return FALSE; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 21a3ed902..b7c440c9e 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1,6 +1,7 @@ #include "global.h" #include "battle.h" #include "battle_anim.h" +#include "battle_interface.h" #include "bg.h" #include "contest.h" #include "data.h" @@ -134,10 +135,10 @@ u8 GetBattlerSpriteCoord(u8 battlerId, u8 coordType) { case BATTLER_COORD_X: case BATTLER_COORD_X_2: - retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].x; + retVal = sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].x; break; case BATTLER_COORD_Y: - retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y; + retVal = sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].y; break; case BATTLER_COORD_Y_PIC_OFFSET: case BATTLER_COORD_Y_PIC_OFFSET_DEFAULT: @@ -278,7 +279,7 @@ u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3) offset = GetBattlerYDelta(battlerId, species); offset -= GetBattlerElevation(battlerId, species); } - y = offset + sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y; + y = offset + sBattlerCoords[WhichBattleCoords(battlerId)][GetBattlerPosition(battlerId)].y; if (a3) { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) @@ -493,7 +494,7 @@ static void TranslateSpriteInWavePattern(struct Sprite *sprite) sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude); sprite->sCirclePosX += sprite->sCircleSpeedX; sprite->sCirclePosY += sprite->sCircleSpeedY; - + if (sprite->sCirclePosX >= 0x100) sprite->sCirclePosX -= 0x100; else if (sprite->sCirclePosX < 0) @@ -2149,8 +2150,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 if (!isBackpic) { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); - LoadSpecialPokePic(&gMonFrontPicTable[species], - gMonSpritesGfxPtr->buffer, + LoadSpecialPokePic(gMonSpritesGfxPtr->buffer, species, personality, TRUE); @@ -2158,8 +2158,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 else { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); - LoadSpecialPokePic(&gMonBackPicTable[species], - gMonSpritesGfxPtr->buffer, + LoadSpecialPokePic(gMonSpritesGfxPtr->buffer, species, personality, FALSE); @@ -2445,7 +2444,7 @@ void AnimTask_AttackerPunchWithTrace(u8 taskId) dest = (task->tPaletteNum + 16) * 16; src = (gSprites[task->tBattlerSpriteId].oam.paletteNum + 0x10) * 0x10; - + // Set trace's priority based on battler's subpriority task->tPriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker); if (task->tPriority == 20 || task->tPriority == 40) diff --git a/src/battle_anim_new.c b/src/battle_anim_new.c index b8304f124..35c124467 100644 --- a/src/battle_anim_new.c +++ b/src/battle_anim_new.c @@ -18,6 +18,7 @@ #include "constants/moves.h" #include "constants/hold_effects.h" #include "constants/items.h" +#include "constants/pokemon.h" // function declarations static void SpriteCB_SpriteToCentreOfSide(struct Sprite *sprite); @@ -7892,3 +7893,12 @@ void AnimTask_TerrainPulse(u8 taskId) } DestroyAnimVisualTask(taskId); } + +void AnimTask_AffectionHangedOn(u8 taskId) +{ + int side = GetBattlerSide(gBattleAnimTarget); + struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty; + + gBattleAnimArgs[0] = GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]]); + DestroyAnimVisualTask(taskId); +} diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 833925550..26ee356c3 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -392,7 +392,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 6a0ecb297..4afa2cb18 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -278,7 +278,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 6a3395354..7d2fedc9c 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -410,7 +410,7 @@ static void CompleteOnHealthbarDone(void) SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else OpponentBufferExecCompleted(); @@ -1588,9 +1588,9 @@ static void OpponentHandleChooseMove(void) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); - } + } if (ShouldUseZMove(gActiveBattler, gBattlerTarget, chosenMove)) - QueueZMove(gActiveBattler, chosenMove); + QueueZMove(gActiveBattler, chosenMove); if (CanMegaEvolve(gActiveBattler)) // If opponent can mega evolve, do it. BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (RET_MEGA_EVOLUTION) | (gBattlerTarget << 8)); else @@ -1617,7 +1617,7 @@ static void OpponentHandleChooseMove(void) do { target = GetBattlerAtPosition(Random() & 2); } while (!CanTargetBattler(gActiveBattler, target, move)); - + #if B_WILD_NATURAL_ENEMIES == TRUE // Don't bother to loop through table if the move can't attack ally if (!(gBattleMoves[move].target & MOVE_TARGET_BOTH)) diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 4dad0c432..aca600fa5 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -248,7 +248,7 @@ static void HandleInputChooseAction(void) { PlaySE(SE_SELECT); TryHideLastUsedBall(); - + switch (gActionSelectionCursor[gActiveBattler]) { case 0: // Top left @@ -616,17 +616,17 @@ static void HandleInputChooseMove(void) { moveTarget = GetBattlerMoveTargetType(gActiveBattler, moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]); } - + if (gBattleStruct->zmove.viewing) { u16 chosenMove = moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]; - + QueueZMove(gActiveBattler, chosenMove); gBattleStruct->zmove.viewing = FALSE; if (gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].split != SPLIT_STATUS) moveTarget = MOVE_TARGET_SELECTED; //damaging z moves always have selected target } - + if (moveTarget & MOVE_TARGET_USER) gMultiUsePlayerCursor = gActiveBattler; else @@ -661,7 +661,7 @@ static void HandleInputChooseMove(void) u32 i = 0; for (i = 0; i < gBattlersCount; i++) TryShowAsTarget(i); - + canSelectTarget = 3; } else if (moveTarget & (MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)) @@ -674,7 +674,7 @@ static void HandleInputChooseMove(void) } #endif } - + switch (canSelectTarget) { case 0: @@ -1347,7 +1347,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -2859,7 +2859,7 @@ static void PlayerHandleChooseMove(void) else { struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]); - + InitMoveSelectionsVarsAndStrings(); gBattleStruct->mega.playerSelect = FALSE; if (!IsMegaTriggerSpriteActive()) @@ -2868,7 +2868,7 @@ static void PlayerHandleChooseMove(void) CreateMegaTriggerSprite(gActiveBattler, 0); if (!IsZMoveTriggerSpriteActive()) gBattleStruct->zmove.triggerSpriteId = 0xFF; - + GetUsableZMoves(gActiveBattler, moveInfo->moves); gBattleStruct->zmove.viable = IsZMoveUsable(gActiveBattler, gMoveSelectionCursor[gActiveBattler]); CreateZMoveTriggerSprite(gActiveBattler, gBattleStruct->zmove.viable); @@ -2953,7 +2953,7 @@ static void PlayerHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index a868d09c0..f29bd1b87 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -292,7 +292,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1528,7 +1528,7 @@ static void PlayerPartnerHandleChooseMove(void) if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - + if (ShouldUseZMove(gActiveBattler, gBattlerTarget, moveInfo->moves[chosenMoveId])) QueueZMove(gActiveBattler, moveInfo->moves[chosenMoveId]); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 3f5e1cf7f..14efa76c2 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -376,7 +376,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index b02f171f9..0d531db92 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -351,7 +351,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1481,7 +1481,7 @@ static void RecordedPlayerHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 9728376df..0b480a23a 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -352,7 +352,7 @@ static void CompleteOnHealthbarDone(void) if (hpValue != -1) { - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP); } else { @@ -1277,7 +1277,7 @@ static void WallyHandleHealthBarUpdate(void) u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP); SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal); - UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT); + UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP); } gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone; diff --git a/src/battle_dome.c b/src/battle_dome.c index 8b3b29fc1..84b7652a5 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2747,7 +2747,7 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode) int i = 0; int typePower = TYPE_x1; - if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || gBattleMoves[move].power == 0) + if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || IS_MOVE_STATUS(move)) return 0; defType1 = gBaseStats[targetSpecies].type1; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 8cd23098f..d832ebbc1 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -282,7 +282,7 @@ static u8 GetBattlePalaceMoveGroup(u8 battlerId, u16 move) case MOVE_TARGET_RANDOM: case MOVE_TARGET_BOTH: case MOVE_TARGET_FOES_AND_ALLY: - if (gBattleMoves[move].power == 0) + if (IS_MOVE_STATUS(move)) return PALACE_MOVE_GROUP_SUPPORT; else return PALACE_MOVE_GROUP_ATTACK; @@ -578,13 +578,13 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op position = GetBattlerPosition(battlerId); if (opponent) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[position], species, currentPersonality); } else { - HandleLoadSpecialPokePic(&gMonBackPicTable[species], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], species, currentPersonality); } @@ -715,7 +715,12 @@ bool8 BattleLoadAllHealthBoxesGfx(u8 state) else { if (state == 2) - LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]); + { + if (WhichBattleCoords(0)) + LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[0]); + else + LoadCompressedSpriteSheet(&sSpriteSheet_SinglesPlayerHealthbox); + } else if (state == 3) LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[1]); else if (state == 4) @@ -860,7 +865,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = gContestResources->moveAnim->personality; otId = gContestResources->moveAnim->otId; - HandleLoadSpecialPokePic(&gMonBackPicTable[targetSpecies], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gContestResources->moveAnim->targetPersonality); @@ -879,7 +884,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); - HandleLoadSpecialPokePic(&gMonBackPicTable[targetSpecies], + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gTransformedPersonalities[battlerAtk]); @@ -889,7 +894,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform, bo personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID); - HandleLoadSpecialPokePic(&gMonFrontPicTable[targetSpecies], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gTransformedPersonalities[battlerAtk]); diff --git a/src/battle_interface.c b/src/battle_interface.c index bdd4b3cd4..5be969105 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -161,7 +161,7 @@ static const u8 *GetHealthboxElementGfxPtr(u8); static u8 *AddTextPrinterAndCreateWindowOnHealthbox(const u8 *, u32, u32, u32, u32 *); static void RemoveWindowOnHealthbox(u32 windowId); -static void UpdateHpTextInHealthboxInDoubles(u8, s16, u8); +static void UpdateHpTextInHealthboxInDoubles(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp); static void UpdateStatusIconInHealthbox(u8); static void TextIntoHealthboxObject(void *, u8 *, s32); @@ -764,6 +764,15 @@ static void InitLastUsedBallAssets(void) gBattleStruct->ballSpriteIds[1] = MAX_SPRITES; } +// This function is here to cover a specific case - one player's mon in a 2 vs 1 double battle. In this scenario - display singles layout. +u32 WhichBattleCoords(u32 battlerId) // 0 - singles, 1 - doubles +{ + if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT && gPlayerPartyCount == 1) + return 0; + else + return IsDoubleBattle(); +} + u8 CreateBattlerHealthboxSprites(u8 battlerId) { s16 data6 = 0; @@ -771,7 +780,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) u8 healthbarSpriteId, megaIndicatorSpriteId; struct Sprite *healthBarSpritePtr; - if (!IsDoubleBattle()) + if (WhichBattleCoords(battlerId) == 0) // Singles { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { @@ -1035,7 +1044,7 @@ void GetBattlerHealthboxCoords(u8 battler, s16 *x, s16 *y) { *x = 0, *y = 0; - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battler)) { if (GetBattlerSide(battler) != B_SIDE_PLAYER) *x = 44, *y = 30; @@ -1102,7 +1111,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) if (GetBattlerSide(battler) == B_SIDE_PLAYER) { objVram = (void *)(OBJ_VRAM0); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battler)) objVram += spriteTileNum + 0x820; else objVram += spriteTileNum + 0x420; @@ -1116,175 +1125,149 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) RemoveWindowOnHealthbox(windowId); } -void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) +static void PrintHpOnHealthbox(u32 spriteId, s16 currHp, s16 maxHp, u32 bgColor, u32 rightTile, u32 leftTile) { - u32 windowId, spriteTileNum; u8 *windowTileData; - u8 text[32]; - void *objVram; + u32 windowId, tilesCount, x, healthboxTileNum; + u8 text[28], *txtPtr; + void *objVram = (void *)(OBJ_VRAM0) + gSprites[spriteId].oam.tileNum * TILE_SIZE_4BPP; - if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER && !IsDoubleBattle()) - { - spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; - if (maxOrCurrent != HP_CURRENT) // singles, max - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 2, &windowId); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0xB40; - HpTextIntoHealthboxObject(objVram, windowTileData, 2); - RemoveWindowOnHealthbox(windowId); - } - else // singles, current - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - text[3] = CHAR_SLASH; - text[4] = EOS; - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 2, &windowId); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0x3E0; - HpTextIntoHealthboxObject(objVram, windowTileData, 1); - objVram = (void *)(OBJ_VRAM0); - objVram += spriteTileNum + 0xB00; - HpTextIntoHealthboxObject(objVram, windowTileData + 0x20, 2); - RemoveWindowOnHealthbox(windowId); - } - } + // To fit 4 digit HP values we need to modify a bit the way hp is printed on Healthbox. + // 6 chars can fit on the right healthbox, the rest goes to the left one + txtPtr = ConvertIntToDecimalStringN(text, currHp, STR_CONV_MODE_RIGHT_ALIGN, 4); + *txtPtr++ = CHAR_SLASH; + txtPtr = ConvertIntToDecimalStringN(txtPtr, maxHp, STR_CONV_MODE_LEFT_ALIGN, 4); + // Print last 6 chars on the right window + windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(txtPtr - 6, 0, 5, bgColor, &windowId); + HpTextIntoHealthboxObject(objVram + rightTile, windowTileData, 4); + RemoveWindowOnHealthbox(windowId); + // Print the rest of the chars on the left window + txtPtr[-6] = EOS; + // if max hp is 3 digits print on block closer to the right window, if 4 digits print further from the right window + if (maxHp >= 1000) + x = 9, tilesCount = 3; else + x = 6, tilesCount = 2, leftTile += 0x20; + windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, x, 5, bgColor, &windowId); + HpTextIntoHealthboxObject(objVram + leftTile, windowTileData, tilesCount); + RemoveWindowOnHealthbox(windowId); +} + +// Note: this is only possible to trigger via debug, it was an unused GF function. +static void UpdateOpponentHpTextDoubles(u32 healthboxSpriteId, u32 barSpriteId, s16 value, u8 maxOrCurrent) +{ + u8 text[32], *txtPtr; + u32 i, var; + u32 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + + if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible { - u8 battler; + memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight)); + if (maxOrCurrent == HP_CURRENT) + var = 0; + else + var = 4; - memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); - battler = gSprites[healthboxSpriteId].hMain_Battler; - if (IsDoubleBattle() == TRUE) - { - UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, value, maxOrCurrent); - } - else if (gBattleSpritesDataPtr->battlerData[battler].hpNumbersNoBars) // don't print text if only bars are visible - { - u32 var; - u8 i; + txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); + if (!maxOrCurrent) + StringCopy(txtPtr, gText_Slash); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER) + for (i = var; i < var + 3; i++) + { + if (i < 3) { - if (maxOrCurrent == HP_CURRENT) - var = 29; - else - var = 89; + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], + (void *)((OBJ_VRAM0) + 32 * (1 + gSprites[barSpriteId].oam.tileNum + i)), + 0x20); } else { - if (maxOrCurrent == HP_CURRENT) - var = 21; - else - var = 49; + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], + (void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[barSpriteId].oam.tileNum)), + 0x20); } + } - ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_LEADING_ZEROS, 3); - RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - - for (i = 0; i < 3; i++) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32], - (void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)), - 0x20); - } + if (maxOrCurrent == HP_CURRENT) + { + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224], + (void *)((OBJ_VRAM0) + ((gSprites[barSpriteId].oam.tileNum + 4) * TILE_SIZE_4BPP)), + 0x20); + CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[barSpriteId].oam.tileNum * TILE_SIZE_4BPP)), 0x20); } } } -static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) +// Same with this one. +static void UpdateOpponentHpTextSingles(u32 healthboxSpriteId, s16 value, u32 maxOrCurrent) { - u32 windowId, spriteTileNum; - u8 *windowTileData; u8 text[32]; - void *objVram; + u32 var, i; + u32 battler = gSprites[healthboxSpriteId].hMain_Battler; + + memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); + if (gBattleSpritesDataPtr->battlerData[battler].hpNumbersNoBars) // don't print text if only bars are visible + { + if (maxOrCurrent == HP_CURRENT) + var = 21; + else + var = 49; + + ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_LEADING_ZEROS, 3); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); + + for (i = 0; i < 3; i++) + { + CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32], + (void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)), + 0x20); + } + } +} + +void UpdateHpTextInHealthbox(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp) +{ + u32 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + if (WhichBattleCoords(battlerId)) + { + UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, maxOrCurrent, currHp, maxHp); + } + else // Single Battle + { + if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Player + { + PrintHpOnHealthbox(healthboxSpriteId, currHp, maxHp, 2, 0xB00, 0x3A0); + } + else // Opponent + { + UpdateOpponentHpTextSingles(healthboxSpriteId, currHp, HP_CURRENT); + UpdateOpponentHpTextSingles(healthboxSpriteId, maxHp, HP_MAX); + } + } +} + +static void UpdateHpTextInHealthboxInDoubles(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp) +{ + u32 barSpriteId = gSprites[healthboxSpriteId].data[5]; if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER) { if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible { - spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP; - objVram = (void *)(OBJ_VRAM0) + spriteTileNum; - - if (maxOrCurrent != HP_CURRENT) // doubles, max hp - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId); - HpTextIntoHealthboxObject((void *)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2); - RemoveWindowOnHealthbox(windowId); - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), + PrintHpOnHealthbox(barSpriteId, currHp, maxHp, 0, 0x80, 0x20); + // Clears the end of the healthbar gfx. + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), (void *)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x20); - } - else - { - ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - text[3] = CHAR_SLASH; - text[4] = EOS; - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 0, &windowId); - FillHealthboxObject(objVram, 0, 3); // Erases HP bar leftover. - HpTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3); - RemoveWindowOnHealthbox(windowId); - } + // Erases HP bar leftover. + FillHealthboxObject((void *)(OBJ_VRAM0) + (gSprites[barSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0, 2); } } - else + else // Opponent { - u8 battlerId; - - memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight)); - battlerId = gSprites[healthboxSpriteId].hMain_Battler; - - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible - { - u8 var = 4; - u8 r7; - u8 *txtPtr; - u8 i; - - if (maxOrCurrent == HP_CURRENT) - var = 0; - - r7 = gSprites[healthboxSpriteId].data[5]; - txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - if (!maxOrCurrent) - StringCopy(txtPtr, gText_Slash); - RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); - - for (i = var; i < var + 3; i++) - { - if (i < 3) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], - (void *)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)), - 0x20); - } - else - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32], - (void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)), - 0x20); - } - } - - if (maxOrCurrent == HP_CURRENT) - { - CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224], - (void *)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)), - 0x20); - CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20); - } - else - { - if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side. - { - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), - (void *)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP), - 0x20); - } - } - } + UpdateOpponentHpTextDoubles(healthboxSpriteId, barSpriteId, maxHp, HP_MAX); + UpdateOpponentHpTextDoubles(healthboxSpriteId, barSpriteId, currHp, HP_CURRENT); } } @@ -1355,22 +1338,23 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) void SwapHpBarsWithHpText(void) { - s32 i; - u8 healthBarSpriteId; + u32 healthBarSpriteId, i; for (i = 0; i < gBattlersCount; i++) { if (gSprites[gHealthboxSpriteIds[i]].callback == SpriteCallbackDummy && GetBattlerSide(i) != B_SIDE_OPPONENT - && (IsDoubleBattle() || GetBattlerSide(i) != B_SIDE_PLAYER)) + && (WhichBattleCoords(i) || GetBattlerSide(i) != B_SIDE_PLAYER)) { + s32 currHp = GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP); + s32 maxHp = GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP); bool8 noBars; gBattleSpritesDataPtr->battlerData[i].hpNumbersNoBars ^= 1; noBars = gBattleSpritesDataPtr->battlerData[i].hpNumbersNoBars; if (GetBattlerSide(i) == B_SIDE_PLAYER) { - if (!IsDoubleBattle()) + if (!WhichBattleCoords(i)) continue; if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) continue; @@ -1380,8 +1364,7 @@ void SwapHpBarsWithHpText(void) healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId; CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX); + UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], HP_BOTH, currHp, maxHp); } else // text to bars { @@ -1404,8 +1387,7 @@ void SwapHpBarsWithHpText(void) healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId; CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * 32), 0x100); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gEnemyParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT); - UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gEnemyParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX); + UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], HP_BOTH, currHp, maxHp); } } else // text to bars @@ -1666,7 +1648,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, { isOpponent = TRUE; - if (!skipPlayer || !IsDoubleBattle()) + if (!skipPlayer || !WhichBattleCoords(battlerId)) bar_X = 104, bar_Y = 40; else bar_X = 104, bar_Y = 16; @@ -2152,7 +2134,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) { TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6); ptr = (void *)(OBJ_VRAM0); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(gSprites[healthboxSpriteId].data[6])) ptr += spriteTileNum + 0x800; else ptr += spriteTileNum + 0x400; @@ -2203,7 +2185,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { status = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_STATUS); - if (!IsDoubleBattle()) + if (!WhichBattleCoords(battlerId)) tileNumAdder = 0x1A; else tileNumAdder = 0x12; @@ -2259,7 +2241,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2); CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void *)(OBJ_PLTT + pltAdder * 2), 2); CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96); - if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT) + if (WhichBattleCoords(battlerId) == 1 || GetBattlerSide(battlerId) == B_SIDE_OPPONENT) { if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) { @@ -2361,28 +2343,31 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId) void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId) { - s32 maxHp, currHp; - u8 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + u32 battlerId = gSprites[healthboxSpriteId].hMain_Battler; + s32 maxHp = GetMonData(mon, MON_DATA_MAX_HP); + s32 currHp = GetMonData(mon, MON_DATA_HP); - if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER) + if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) { - u8 isDoubles; + u8 isDoubles = WhichBattleCoords(battlerId); if (elementId == HEALTHBOX_LEVEL || elementId == HEALTHBOX_ALL) UpdateLvlInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_LEVEL)); - if (elementId == HEALTHBOX_CURRENT_HP || elementId == HEALTHBOX_ALL) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_HP), HP_CURRENT); - if (elementId == HEALTHBOX_MAX_HP || elementId == HEALTHBOX_ALL) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_MAX_HP), HP_MAX); + + if (elementId == HEALTHBOX_ALL) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_BOTH, currHp, maxHp); + else if (elementId == HEALTHBOX_MAX_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_MAX, currHp, maxHp); + else if (elementId == HEALTHBOX_CURRENT_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_CURRENT, currHp, maxHp); + if (elementId == HEALTHBOX_HEALTH_BAR || elementId == HEALTHBOX_ALL) { LoadBattleBarGfx(0); - maxHp = GetMonData(mon, MON_DATA_MAX_HP); - currHp = GetMonData(mon, MON_DATA_HP); SetBattleBarStruct(battlerId, healthboxSpriteId, maxHp, currHp, 0); MoveBattleBar(battlerId, healthboxSpriteId, HEALTH_BAR, 0); } - isDoubles = IsDoubleBattle(); + if (!isDoubles && (elementId == HEALTHBOX_EXP_BAR || elementId == HEALTHBOX_ALL)) { u16 species; @@ -2413,15 +2398,18 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem { if (elementId == HEALTHBOX_LEVEL || elementId == HEALTHBOX_ALL) UpdateLvlInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_LEVEL)); - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars && (elementId == HEALTHBOX_CURRENT_HP || elementId == HEALTHBOX_ALL)) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_HP), HP_CURRENT); - if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars && (elementId == HEALTHBOX_MAX_HP || elementId == HEALTHBOX_ALL)) - UpdateHpTextInHealthbox(healthboxSpriteId, GetMonData(mon, MON_DATA_MAX_HP), HP_MAX); + if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) + { + if (elementId == HEALTHBOX_ALL) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_BOTH, currHp, maxHp); + else if (elementId == HEALTHBOX_MAX_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_MAX, currHp, maxHp); + else if (elementId == HEALTHBOX_CURRENT_HP) + UpdateHpTextInHealthbox(healthboxSpriteId, HP_CURRENT, currHp, maxHp); + } if (elementId == HEALTHBOX_HEALTH_BAR || elementId == HEALTHBOX_ALL) { LoadBattleBarGfx(0); - maxHp = GetMonData(mon, MON_DATA_MAX_HP); - currHp = GetMonData(mon, MON_DATA_HP); SetBattleBarStruct(battlerId, healthboxSpriteId, maxHp, currHp, 0); MoveBattleBar(battlerId, healthboxSpriteId, HEALTH_BAR, 0); } @@ -2908,7 +2896,7 @@ static void TextIntoAbilityPopUp(void *dest, u8 *windowTileData, s32 arg2, bool3 #define MAX_CHARS_PRINTED 12 -static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTileData2, u32 x1, u32 x2, u32 y, u32 color1, u32 color2, u32 color3) +static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTileData2, u32 x1, u32 x2, u32 y, u32 color1, u32 color2, u32 color3, bool32 alignAbilityChars) { u32 windowId, i; u8 *windowTileData; @@ -2923,6 +2911,15 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi } text1[i] = EOS; + // Because there are two Windows, we need to align the strings, so that the first char in the second window starts right after the last char in the first window. + // Windows are 64 pixels in width. + if (alignAbilityChars && i == MAX_CHARS_PRINTED) + { + u32 width = GetStringWidth(FONT_SMALL, text1, 0); + if (x1 + width < 64) + x1 += 64 - (x1 + width); + } + windowTileData = AddTextPrinterAndCreateWindowOnAbilityPopUp(text1, x1, y, color1, color2, color3, &windowId); TextIntoAbilityPopUp(spriteTileData1, windowTileData, 8, (y == 0)); RemoveWindow(windowId); @@ -2951,7 +2948,8 @@ static void ClearAbilityName(u8 spriteId1, u8 spriteId2) (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256, 6, 1, 4, - 7, 9, 1); + 7, 9, 1, + FALSE); } static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2) @@ -2988,7 +2986,8 @@ static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2) (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32), 7, 0, 0, - 2, 7, 1); + 2, 7, 1, + FALSE); } static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2) @@ -2996,9 +2995,10 @@ static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2) PrintOnAbilityPopUp(gAbilityNames[ability], (void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32) + 256, (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256, - 6, 1, + 6, 0, 4, - 7, 9, 1); + 7, 9, 1, + TRUE); } #define PIXEL_COORDS_TO_OFFSET(x, y)( \ @@ -3198,7 +3198,7 @@ void UpdateAbilityPopup(u8 battlerId) u8 spriteId1 = gBattleStruct->abilityPopUpSpriteIds[battlerId][0]; u8 spriteId2 = gBattleStruct->abilityPopUpSpriteIds[battlerId][1]; u16 ability = (gBattleScripting.abilityPopupOverwrite != 0) ? gBattleScripting.abilityPopupOverwrite : gBattleMons[battlerId].ability; - + ClearAbilityName(spriteId1, spriteId2); PrintAbilityOnAbilityPopUp(ability, spriteId1, spriteId2); RestoreOverwrittenPixels((void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32)); @@ -3384,7 +3384,7 @@ static void DestroyLastUsedBallGfx(struct Sprite *sprite) } static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_BALL_WIN_X_0) @@ -3401,7 +3401,7 @@ static void SpriteCB_LastUsedBallWin(struct Sprite *sprite) } static void SpriteCB_LastUsedBall(struct Sprite *sprite) -{ +{ if (sprite->sHide) { if (sprite->x != LAST_USED_BALL_X_0) diff --git a/src/battle_main.c b/src/battle_main.c index 2056838cc..528ae51af 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2981,10 +2981,10 @@ static void BattleStartClearSetData(void) gBattleStruct->arenaLostOpponentMons = 0; gBattleStruct->mega.triggerSpriteId = 0xFF; - + gBattleStruct->stickyWebUser = 0xFF; gBattleStruct->appearedInBattle = 0; - + for (i = 0; i < PARTY_SIZE; i++) { gBattleStruct->usedHeldItems[i][0] = 0; @@ -3084,7 +3084,7 @@ void SwitchInClearSetData(void) gBattleStruct->lastTakenMoveFrom[gActiveBattler][3] = 0; gBattleStruct->lastMoveFailed &= ~(gBitTable[gActiveBattler]); gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]); - + if (gActiveBattler == gBattleStruct->stickyWebUser) gBattleStruct->stickyWebUser = 0xFF; // Switched into sticky web user slot so reset it @@ -3100,7 +3100,7 @@ void SwitchInClearSetData(void) gBattleResources->flags->flags[gActiveBattler] = 0; gCurrentMove = MOVE_NONE; gBattleStruct->arenaTurnCounter = 0xFF; - + // Reset damage to prevent things like red card activating if the switched-in mon is holding it gSpecialStatuses[gActiveBattler].physicalDmg = 0; gSpecialStatuses[gActiveBattler].specialDmg = 0; @@ -3184,7 +3184,7 @@ void FaintClearSetData(void) gBattleStruct->lastTakenMoveFrom[gActiveBattler][3] = 0; gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]); - + if (gActiveBattler == gBattleStruct->stickyWebUser) gBattleStruct->stickyWebUser = 0xFF; // User of sticky web fainted, so reset the stored battler ID @@ -3342,7 +3342,7 @@ static void DoBattleIntro(void) MarkBattlerForControllerExec(gActiveBattler); } } - else // wild mon 2 + else if (IsBattlerAlive(gActiveBattler)) // wild mon 2 if alive { BtlController_EmitLoadMonSprite(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); @@ -3701,7 +3701,7 @@ static void TryDoEventsBeforeFirstTurn(void) gMoveResultFlags = 0; gRandomTurnNumber = Random(); - + GetAiLogicData(); // get assumed abilities, hold effects, etc of all battlers if (gBattleTypeFlags & BATTLE_TYPE_ARENA) @@ -3909,7 +3909,7 @@ static void HandleTurnActionSelectionState(void) case STATE_TURN_START_RECORD: // Recorded battle related action on start of every turn. RecordedBattle_CopyBattlerMoves(); gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; - + // Do AI score computations here so we can use them in AI_TrySwitchOrUseItem if ((gBattleTypeFlags & BATTLE_TYPE_HAS_AI || IsWildMonSmart()) && IsBattlerAIControlled(gActiveBattler)) { gBattleStruct->aiMoveOrAction[gActiveBattler] = ComputeBattleAiScores(gActiveBattler); @@ -4032,8 +4032,8 @@ static void HandleTurnActionSelectionState(void) { BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); } - else if ((i = IsAbilityPreventingEscape(gActiveBattler) - && ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL)) + else if (ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL + && (i = IsAbilityPreventingEscape(gActiveBattler))) // must be last to keep i value integrity { BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gBattleMons[i - 1].ability, gBattleStruct->battlerPartyOrders[gActiveBattler]); } @@ -4575,7 +4575,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) // QUICK CLAW / CUSTAP - always first // LAGGING TAIL - always last // STALL - always last - + if (gProtectStructs[battler1].quickDraw && !gProtectStructs[battler2].quickDraw) strikesFirst = 0; else if (!gProtectStructs[battler1].quickDraw && gProtectStructs[battler2].quickDraw) diff --git a/src/battle_message.c b/src/battle_message.c index 688a48f25..3c6767588 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -753,10 +753,22 @@ static const u8 sText_TargetTooHeavy[] = _("But the target\nwas too heavy!"); static const u8 sText_MeteorBeamCharging[] = _("{B_ATK_NAME_WITH_PREFIX} is overflowing\nwith space energy!"); static const u8 sText_HeatingUpBeak[] = _("{B_ATK_NAME_WITH_PREFIX} started\nheating up its beak!"); static const u8 sText_CourtChange[] = _("{B_ATK_NAME_WITH_PREFIX} swapped the battle\neffects affecting each side!"); +static const u8 sText_AttackerExpelledThePoison[] = _("{B_ATK_NAME_WITH_PREFIX} managed to\nexpel the poison!"); +static const u8 sText_AttackerShookItselfAwake[] = _("{B_ATK_NAME_WITH_PREFIX} shook itself awake!"); +static const u8 sText_AttackerBrokeThroughParalysis[] = _("{B_ATK_NAME_WITH_PREFIX} gathered all its energy\nto overcome its paralysis!"); +static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!"); +static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!"); +static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut, + [STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce, + [STRINGID_ATTACKERHEALEDITSBURN - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsBurn, + [STRINGID_ATTACKERBROKETHROUGHPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_AttackerBrokeThroughParalysis, + [STRINGID_ATTACKERSHOOKITSELFAWAKE - BATTLESTRINGS_TABLE_START] = sText_AttackerShookItselfAwake, + [STRINGID_ATTACKEREXPELLEDTHEPOISON - BATTLESTRINGS_TABLE_START] = sText_AttackerExpelledThePoison, [STRINGID_ZPOWERSURROUNDS - BATTLESTRINGS_TABLE_START] = sText_ZPowerSurrounds, [STRINGID_ZMOVEUNLEASHED - BATTLESTRINGS_TABLE_START] = sText_ZPowerUnleashed, [STRINGID_ZMOVERESETSSTATS - BATTLESTRINGS_TABLE_START] = sText_ZMoveResetsStats, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ee8b213ec..425661108 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -59,6 +59,7 @@ #include "constants/songs.h" #include "constants/trainers.h" #include "battle_util.h" +#include "constants/pokemon.h" extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; @@ -1345,7 +1346,7 @@ static bool32 TryAegiFormChange(void) default: return FALSE; case SPECIES_AEGISLASH: // Shield -> Blade - if (gBattleMoves[gCurrentMove].power == 0) + if (IS_MOVE_STATUS(gCurrentMove)) return FALSE; gBattleMons[gBattlerAttacker].species = SPECIES_AEGISLASH_BLADE; break; @@ -1713,7 +1714,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE)) moveAcc = 50; // Check Wonder Skin. - if (defAbility == ABILITY_WONDER_SKIN && gBattleMoves[move].power == 0) + if (defAbility == ABILITY_WONDER_SKIN && IS_MOVE_STATUS(move) && moveAcc > 50) moveAcc = 50; calc = gAccuracyStageRatios[buff].dividend * moveAcc; @@ -1756,6 +1757,13 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u if (gFieldStatuses & STATUS_FIELD_GRAVITY) calc = (calc * 5) / 3; // 1.66 Gravity acc boost +#if B_AFFECTION_MECHANICS == TRUE + // With high affection/friendship there's a chance to evade a move by substracting 10% of its accuracy. + // I can't find exact information about that chance, so I'm just gonna write it as a 20% chance for now. + if (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[battlerDef]]) >= FRIENDSHIP_150_TO_199 && (Random() % 100) <= 20) + calc = (calc * 90) / 100; +#endif + return calc; } @@ -1924,6 +1932,9 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi + (holdEffectAtk == HOLD_EFFECT_SCOPE_LENS) + 2 * (holdEffectAtk == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * BENEFITS_FROM_LEEK(battlerAtk, holdEffectAtk) + #if B_AFFECTION_MECHANICS == TRUE + + 2 * (GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_200_TO_254) + #endif + (abilityAtk == ABILITY_SUPER_LUCK); if (critChance >= ARRAY_COUNT(sCriticalHitChance)) @@ -1992,6 +2003,8 @@ static void Cmd_adjustdamage(void) { u8 holdEffect, param; u32 moveType; + u32 friendshipScore = GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerTarget]]); + u32 rand = Random() % 100; GET_MOVE_TYPE(gCurrentMove, moveType); @@ -2007,7 +2020,7 @@ static void Cmd_adjustdamage(void) gPotentialItemEffectBattler = gBattlerTarget; - if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param) + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && rand < param) { RecordItemEffectBattle(gBattlerTarget, holdEffect); gSpecialStatuses[gBattlerTarget].focusBanded = TRUE; @@ -2024,11 +2037,24 @@ static void Cmd_adjustdamage(void) RecordItemEffectBattle(gBattlerTarget, holdEffect); gSpecialStatuses[gBattlerTarget].focusSashed = TRUE; } +#if B_AFFECTION_MECHANICS == TRUE + else if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER && friendshipScore >= FRIENDSHIP_100_TO_149) + { + if ((friendshipScore == FRIENDSHIP_MAX && rand < 25) + || (friendshipScore == FRIENDSHIP_200_TO_254 && rand < 20) + || (friendshipScore == FRIENDSHIP_150_TO_199 && rand < 15) + || (friendshipScore == FRIENDSHIP_100_TO_149 && rand < 10)) + gSpecialStatuses[gBattlerTarget].affectionEndured = TRUE; + } +#endif if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBattlerTarget].endured && !gSpecialStatuses[gBattlerTarget].focusBanded && !gSpecialStatuses[gBattlerTarget].focusSashed +#if B_AFFECTION_MECHANICS == TRUE + && !gSpecialStatuses[gBattlerTarget].affectionEndured +#endif && !gSpecialStatuses[gBattlerTarget].sturdied) goto END; @@ -2049,6 +2075,12 @@ static void Cmd_adjustdamage(void) gMoveResultFlags |= MOVE_RESULT_STURDIED; gLastUsedAbility = ABILITY_STURDY; } +#if B_AFFECTION_MECHANICS == TRUE + else if (gSpecialStatuses[gBattlerTarget].affectionEndured) + { + gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED_AFFECTION; + } +#endif END: gBattlescriptCurrInstr++; @@ -2504,6 +2536,16 @@ static void Cmd_resultmessage(void) { stringId = STRINGID_BUTITFAILED; } + #if B_AFFECTION_MECHANICS == TRUE + else if (gMoveResultFlags & MOVE_RESULT_FOE_ENDURED_AFFECTION) + { + gSpecialStatuses[gBattlerTarget].affectionEndured = FALSE; + gMoveResultFlags &= ~MOVE_RESULT_FOE_ENDURED_AFFECTION; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AffectionBasedEndurance; + return; + } + #endif else { gBattleCommunication[MSG_DISPLAY] = 0; @@ -4070,6 +4112,10 @@ static void Cmd_getexp(void) gBattleMoveDamage = value + 1; } #endif + #if B_AFFECTION_MECHANICS == TRUE + if (GetMonFriendshipScore(&gPlayerParty[gBattleStruct->expGetterMonId]) >= FRIENDSHIP_50_TO_99) + gBattleMoveDamage = (gBattleMoveDamage * 120) / 100; + #endif if (IsTradedMon(&gPlayerParty[gBattleStruct->expGetterMonId])) { @@ -8451,7 +8497,7 @@ static void Cmd_various(void) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else if (gBattleMoves[gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; @@ -8549,7 +8595,7 @@ static void Cmd_various(void) case VARIOUS_TRY_ME_FIRST: if (GetBattlerTurnOrderNum(gBattlerAttacker) > GetBattlerTurnOrderNum(gBattlerTarget)) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); - else if (gBattleMoves[gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerTarget].moves[gBattleStruct->chosenMovePositions[gBattlerTarget]])) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); else { @@ -10631,19 +10677,20 @@ static void Cmd_setmultihitcounter(void) else { #if B_MULTI_HIT_CHANCE >= GEN_5 - // 2 and 3 hits: 33.3% - // 4 and 5 hits: 16.7% - gMultiHitCounter = Random() % 4; - if (gMultiHitCounter > 2) - { - gMultiHitCounter = (Random() % 3); - if (gMultiHitCounter < 2) - gMultiHitCounter = 2; - else - gMultiHitCounter = 3; - } + // Based on Gen 5's odds + // 35% for 2 hits + // 35% for 3 hits + // 15% for 4 hits + // 15% for 5 hits + gMultiHitCounter = Random() % 100; + if (gMultiHitCounter < 35) + gMultiHitCounter = 2; + else if (gMultiHitCounter < 35 + 35) + gMultiHitCounter = 3; + else if (gMultiHitCounter < 35 + 35 + 15) + gMultiHitCounter = 4; else - gMultiHitCounter += 3; + gMultiHitCounter = 5; #else // 2 and 3 hits: 37.5% // 4 and 5 hits: 12.5% @@ -11067,6 +11114,13 @@ static void Cmd_tryKO(void) gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON; gLastUsedItem = gBattleMons[gBattlerTarget].item; } + #if B_AFFECTION_MECHANICS == TRUE + else if (gSpecialStatuses[gBattlerTarget].affectionEndured) + { + gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - 1; + gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED_AFFECTION; + } + #endif else { gBattleMoveDamage = gBattleMons[gBattlerTarget].hp; @@ -13506,11 +13560,11 @@ bool32 DoesSubstituteBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) bool32 DoesDisguiseBlockMove(u8 battlerAtk, u8 battlerDef, u32 move) { - if (GetBattlerAbility(battlerDef) != ABILITY_DISGUISE - || gBattleMons[battlerDef].species != SPECIES_MIMIKYU + if (gBattleMons[battlerDef].species != SPECIES_MIMIKYU || gBattleMons[battlerDef].status2 & STATUS2_TRANSFORMED - || gBattleMoves[move].power == 0 - || gHitMarker & HITMARKER_IGNORE_DISGUISE) + || IS_MOVE_STATUS(move) + || gHitMarker & HITMARKER_IGNORE_DISGUISE + || GetBattlerAbility(battlerDef) != ABILITY_DISGUISE) return FALSE; else return TRUE; @@ -13729,7 +13783,7 @@ static void Cmd_handleballthrow(void) case ITEM_NET_BALL: if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_WATER) || IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_BUG)) #if B_NET_BALL_MODIFIER >= GEN_7 - ballMultiplier = 50; + ballMultiplier = 35; #else ballMultiplier = 30; #endif @@ -13924,13 +13978,13 @@ static void Cmd_handleballthrow(void) u8 shakes; u8 maxShakes; - gBattleSpritesDataPtr->animationData->isCriticalCapture = 0; - gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = 0; + gBattleSpritesDataPtr->animationData->isCriticalCapture = FALSE; + gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = FALSE; if (CriticalCapture(odds)) { maxShakes = BALL_1_SHAKE; // critical capture doesn't guarantee capture - gBattleSpritesDataPtr->animationData->isCriticalCapture = 1; + gBattleSpritesDataPtr->animationData->isCriticalCapture = TRUE; } else { @@ -13954,7 +14008,7 @@ static void Cmd_handleballthrow(void) if (shakes == maxShakes) // mon caught, copy of the code above { if (IsCriticalCapture()) - gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = 1; + gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE; UndoFormChange(gBattlerPartyIndexes[gBattlerTarget], GET_BATTLER_SIDE(gBattlerTarget), FALSE); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; diff --git a/src/battle_tv.c b/src/battle_tv.c index b6647b116..19d3eba8d 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -1435,7 +1435,7 @@ static void TrySetBattleSeminarShow(void) return; else if (gBattleTypeFlags & (BATTLE_TYPE_PALACE | BATTLE_TYPE_PIKE | BATTLE_TYPE_PYRAMID)) return; - else if (gBattleMoves[gBattleMons[gBattlerAttacker].moves[gMoveSelectionCursor[gBattlerAttacker]]].power == 0) + else if (IS_MOVE_STATUS(gBattleMons[gBattlerAttacker].moves[gMoveSelectionCursor[gBattlerAttacker]])) return; i = 0; @@ -1496,7 +1496,7 @@ static void TrySetBattleSeminarShow(void) static bool8 ShouldCalculateDamage(u16 moveId, s32 *dmg, u16 *powerOverride) { - if (gBattleMoves[moveId].power == 0) + if (IS_MOVE_STATUS(moveId)) { *dmg = 0; return FALSE; diff --git a/src/battle_util.c b/src/battle_util.c index 34999c4ed..b6c2c3373 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -45,6 +45,7 @@ #include "constants/species.h" #include "constants/trainers.h" #include "constants/weather.h" +#include "constants/pokemon.h" extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; @@ -295,7 +296,7 @@ void HandleAction_UseMove(void) { gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; } - + // check z move used if (gBattleStruct->zmove.toBeUsed[gBattlerAttacker] != MOVE_NONE && !IS_MOVE_STATUS(gCurrentMove)) { @@ -396,7 +397,7 @@ void HandleAction_UseMove(void) u16 battlerAbility; gActiveBattler = gBattlerByTurnOrder[var]; battlerAbility = GetBattlerAbility(gActiveBattler); - + RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); if (battlerAbility == ABILITY_LIGHTNING_ROD) gSpecialStatuses[gActiveBattler].lightningRodRedirected = TRUE; @@ -910,7 +911,7 @@ void HandleAction_ActionFinished(void) gBattleCommunication[4] = 0; gBattleScripting.multihitMoveEffect = 0; gBattleResources->battleScriptsStack->size = 0; - + #if B_RECALC_TURN_AFTER_ACTIONS >= GEN_8 // i starts at `gCurrentTurnActionNumber` because we don't want to recalculate turn order for mon that have already // taken action. It's been previously increased, which we want in order to not recalculate the turn of the mon that just finished its action @@ -931,7 +932,7 @@ void HandleAction_ActionFinished(void) { if (GetWhoStrikesFirst(battler1, battler2, TRUE)) // If the actions chosen are switching, we recalc order but ignoring the moves SwapTurnOrder(i, j); - } + } } } #endif @@ -1464,20 +1465,20 @@ void CancelMultiTurnMoves(u8 battler) // Clear battler's semi-invulnerable bits if they are not held by Sky Drop. if (!(gStatuses3[battler] & STATUS3_SKY_DROPPED)) gStatuses3[battler] &= ~(STATUS3_SEMI_INVULNERABLE); - + // Check to see if this Pokemon was in the middle of using Sky Drop. If so, release the target. if (gBattleStruct->skyDropTargets[battler] != 0xFF && !(gStatuses3[battler] & STATUS3_SKY_DROPPED)) { // Get the target's battler id u8 otherSkyDropper = gBattleStruct->skyDropTargets[battler]; - + // Clears sky_dropped and on_air statuses gStatuses3[otherSkyDropper] &= ~(STATUS3_SKY_DROPPED | STATUS3_ON_AIR); - + // Makes both attacker and target's sprites visible gSprites[gBattlerSpriteIds[battler]].invisible = FALSE; gSprites[gBattlerSpriteIds[otherSkyDropper]].invisible = FALSE; - + // If target was sky dropped in the middle of Outrage/Thrash/Petal Dance, // confuse them upon release and display "confused by fatigue" message & animation. // Don't do this if this CancelMultiTurnMoves is caused by falling asleep via Yawn. @@ -1765,7 +1766,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && gBattleMoves[move].power == 0) + if (!gBattleStruct->zmove.active && gDisableStructs[gActiveBattler].tauntTimer != 0 && IS_MOVE_STATUS(move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -1860,7 +1861,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedBelchInPalace; + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedStuffCheeksInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1877,6 +1878,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveChoiceItemInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1885,12 +1887,13 @@ u8 TrySetCantSelectMoveBattleScript(void) limitations++; } } - else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && gBattleMoves[move].power == 0 && move != MOVE_ME_FIRST) + else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && IS_MOVE_STATUS(move) && move != MOVE_ME_FIRST) { gCurrentMove = move; gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveAssaultVestInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1906,6 +1909,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveGorillaTacticsInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else @@ -1928,10 +1932,24 @@ u8 TrySetCantSelectMoveBattleScript(void) } } + if (gBattleMoves[move].effect == EFFECT_PLACEHOLDER) + { + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholderInPalace; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; + } + else + { + gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedPlaceholder; + limitations++; + } + } + return limitations; } -u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) +u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u16 check) { u8 holdEffect = GetBattlerHoldEffect(battlerId, TRUE); u16 *choicedMove = &gBattleStruct->choicedMove[battlerId]; @@ -1942,49 +1960,52 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) for (i = 0; i < MAX_MON_MOVES; i++) { // No move - if (gBattleMons[battlerId].moves[i] == MOVE_NONE && check & MOVE_LIMITATION_ZEROMOVE) + if (check & MOVE_LIMITATION_ZEROMOVE && gBattleMons[battlerId].moves[i] == MOVE_NONE) unusableMoves |= gBitTable[i]; // No PP - else if (gBattleMons[battlerId].pp[i] == 0 && check & MOVE_LIMITATION_PP) + else if (check & MOVE_LIMITATION_PP && gBattleMons[battlerId].pp[i] == 0) + unusableMoves |= gBitTable[i]; + // Placeholder + else if (check & MOVE_LIMITATION_PLACEHOLDER && gBattleMoves[gBattleMons[battlerId].moves[i]].effect == EFFECT_PLACEHOLDER) unusableMoves |= gBitTable[i]; // Disable - else if (gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove && check & MOVE_LIMITATION_DISABLED) + else if (check & MOVE_LIMITATION_DISABLED && gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove) unusableMoves |= gBitTable[i]; // Torment - else if (gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].status2 & STATUS2_TORMENT) + else if (check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && gBattleMons[battlerId].status2 & STATUS2_TORMENT) unusableMoves |= gBitTable[i]; // Taunt - else if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0) + else if (check & MOVE_LIMITATION_TAUNT && gDisableStructs[battlerId].tauntTimer && IS_MOVE_STATUS(gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Imprison - else if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON) + else if (check & MOVE_LIMITATION_IMPRISON && GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Encore - else if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_ENCORE && gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; // Choice Items - else if (HOLD_EFFECT_CHOICE(holdEffect) && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_CHOICE_ITEM && HOLD_EFFECT_CHOICE(holdEffect) && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; // Assault Vest - else if (holdEffect == HOLD_EFFECT_ASSAULT_VEST && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0 && gBattleMons[battlerId].moves[i] != MOVE_ME_FIRST) + else if (check & MOVE_LIMITATION_ASSAULT_VEST && holdEffect == HOLD_EFFECT_ASSAULT_VEST && IS_MOVE_STATUS(gBattleMons[battlerId].moves[i]) && gBattleMons[battlerId].moves[i] != MOVE_ME_FIRST) unusableMoves |= gBitTable[i]; // Gravity - else if (IsGravityPreventingMove(gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_GRAVITY && IsGravityPreventingMove(gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Heal Block - else if (IsHealBlockPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_HEAL_BLOCK && IsHealBlockPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Belch - else if (IsBelchPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) + else if (check & MOVE_LIMITATION_BELCH && IsBelchPreventingMove(battlerId, gBattleMons[battlerId].moves[i])) unusableMoves |= gBitTable[i]; // Throat Chop - else if (gDisableStructs[battlerId].throatChopTimer && gBattleMoves[gBattleMons[battlerId].moves[i]].flags & FLAG_SOUND) + else if (check & MOVE_LIMITATION_THROAT_CHOP && gDisableStructs[battlerId].throatChopTimer && gBattleMoves[gBattleMons[battlerId].moves[i]].flags & FLAG_SOUND) unusableMoves |= gBitTable[i]; // Stuff Cheeks - else if (gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES) + else if (check & MOVE_LIMITATION_STUFF_CHEEKS && gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES) unusableMoves |= gBitTable[i]; // Gorilla Tactics - else if (GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) + else if (check & MOVE_LIMITATION_CHOICE_ITEM && GetBattlerAbility(battlerId) == ABILITY_GORILLA_TACTICS && *choicedMove != MOVE_NONE && *choicedMove != MOVE_UNAVAILABLE && *choicedMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; } return unusableMoves; @@ -2084,6 +2105,26 @@ void TryToRevertMimicry(void) } } +u32 GetMonFriendshipScore(struct Pokemon *pokemon) +{ + u32 friendshipScore = GetMonData(pokemon, MON_DATA_FRIENDSHIP); + + if (friendshipScore == MAX_FRIENDSHIP) + return FRIENDSHIP_MAX; + if (friendshipScore >= 200) + return FRIENDSHIP_200_TO_254; + if (friendshipScore >= 150) + return FRIENDSHIP_150_TO_199; + if (friendshipScore >= 100) + return FRIENDSHIP_100_TO_149; + if (friendshipScore >= 50) + return FRIENDSHIP_50_TO_99; + if (friendshipScore >= 1) + return FRIENDSHIP_1_TO_49; + + return FRIENDSHIP_NONE; +} + enum { ENDTURN_ORDER, @@ -2112,6 +2153,7 @@ enum ENDTURN_ION_DELUGE, ENDTURN_FAIRY_LOCK, ENDTURN_RETALIATE, + ENDTURN_STATUS_HEAL, ENDTURN_FIELD_COUNT, }; @@ -2342,6 +2384,7 @@ u8 DoFieldEndTurnEffects(void) if (effect == 0) { gBattleStruct->turnCountersTracker++; + gBattleStruct->turnSideTracker = 0; } break; case ENDTURN_RAIN: @@ -2558,6 +2601,22 @@ u8 DoFieldEndTurnEffects(void) gSideTimers[B_SIDE_OPPONENT].retaliateTimer--; gBattleStruct->turnCountersTracker++; break; + case ENDTURN_STATUS_HEAL: + for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++) + { + #if B_AFFECTION_MECHANICS == TRUE + if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER + && GetMonFriendshipScore(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]) >= FRIENDSHIP_150_TO_199 + && (Random() % 100 < 20)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + BattleScriptExecute(BattleScript_AffectionBasedStatusHeal); + break; + } + #endif + } + gBattleStruct->turnCountersTracker++; + break; case ENDTURN_FIELD_COUNT: effect++; break; @@ -3559,7 +3618,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case CANCELLER_TAUNTED: // taunt - if (gDisableStructs[gBattlerAttacker].tauntTimer && gBattleMoves[gCurrentMove].power == 0) + if (gDisableStructs[gBattlerAttacker].tauntTimer && IS_MOVE_STATUS(gCurrentMove)) { gProtectStructs[gBattlerAttacker].usedTauntedMove = TRUE; CancelMultiTurnMoves(gBattlerAttacker); @@ -3751,7 +3810,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->zmove.used[gBattlerAttacker] = TRUE; if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsPartnerMonFromSameTrainer(gBattlerAttacker)) gBattleStruct->zmove.used[BATTLE_PARTNER(gBattlerAttacker)] = TRUE; //if 1v1 double, set partner used flag as well - + gBattleScripting.battler = gBattlerAttacker; if (gBattleStruct->zmove.activeSplit == SPLIT_STATUS) { @@ -4992,7 +5051,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move if (effect == 1) // Drain Hp ability. { -#if B_HEAL_BLOCKING >= GEN_5 +#if B_HEAL_BLOCKING >= GEN_5 if (BATTLER_MAX_HP(battler) || gStatuses3[battler] & STATUS3_HEAL_BLOCK) #else if (BATTLER_MAX_HP(battler)) @@ -8067,7 +8126,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) u32 i; u16 basePower = gBattleMoves[move].power; u32 weight, hpFraction, speed; - + if (gBattleStruct->zmove.active) return gBattleMoves[gBattleStruct->zmove.baseMoves[battlerAtk]].zMovePower; @@ -8498,15 +8557,15 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_LUSTROUS_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_PALKIA && (moveType == TYPE_WATER || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_PALKIA && (moveType == TYPE_WATER || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_ADAMANT_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_DIALGA && (moveType == TYPE_STEEL || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_DIALGA && (moveType == TYPE_STEEL || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_GRISEOUS_ORB: - if (gBattleMons[battlerAtk].species == SPECIES_GIRATINA && (moveType == TYPE_GHOST || moveType == TYPE_DRAGON)) + if (GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_GIRATINA && (moveType == TYPE_GHOST || moveType == TYPE_DRAGON)) MulModifier(&modifier, holdEffectModifier); break; case HOLD_EFFECT_SOUL_DEW: @@ -9160,7 +9219,7 @@ static s32 DoMoveDamageCalc(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 isCrit, bool32 randomFactor, bool32 updateFlags, u16 typeEffectivenessModifier) { s32 dmg; - + // Don't calculate damage if the move has no effect on target. if (typeEffectivenessModifier == UQ_4_12(0)) return 0; @@ -9497,7 +9556,7 @@ bool32 CanMegaEvolve(u8 battlerId) // Cannot use z move and mega evolve on same turn if (gBattleStruct->zmove.toBeUsed[battlerId]) return FALSE; - + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && IsPartnerMonFromSameTrainer(battlerId) && (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)]))) @@ -10178,7 +10237,7 @@ void DoBurmyFormChange(u32 monId) currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL); - if ((GET_BASE_SPECIES_ID(currSpecies) == SPECIES_BURMY) + if ((GET_BASE_SPECIES_ID(currSpecies) == SPECIES_BURMY) && (gBattleStruct->appearedInBattle & gBitTable[monId]) // Burmy appeared in battle && GetMonData(&party[monId], MON_DATA_HP, NULL) != 0) // Burmy isn't fainted { diff --git a/src/contest.c b/src/contest.c index 0c525ed3a..0b5eda51b 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3121,7 +3121,7 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind u8 spriteId; species = SanitizeSpecies(species); - HandleLoadSpecialPokePic(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20); SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_PLAYER_LEFT); diff --git a/src/contest_painting.c b/src/contest_painting.c index 48021e28c..f891946d6 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -367,20 +367,18 @@ static void InitContestMonPixels(u16 species, bool8 backPic) LZDecompressVram(pal, gContestPaintingMonPalette); if (!backPic) { - HandleLoadSpecialPokePic( - &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], - species, - gContestPaintingWinner->personality); + HandleLoadSpecialPokePic(TRUE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + species, + gContestPaintingWinner->personality); _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } else { - HandleLoadSpecialPokePic( - &gMonBackPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], - species, - gContestPaintingWinner->personality); + HandleLoadSpecialPokePic(FALSE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], + species, + gContestPaintingWinner->personality); _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } } diff --git a/src/contest_util.c b/src/contest_util.c index 79bf09eb2..dfd69a285 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -892,11 +892,10 @@ static void Task_ShowWinnerMonBanner(u8 taskId) species = gContestMons[i].species; personality = gContestMons[i].personality; otId = gContestMons[i].otId; - HandleLoadSpecialPokePic( - &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], - species, - personality); + HandleLoadSpecialPokePic(TRUE, + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + species, + personality); pokePal = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); LoadCompressedSpritePalette(pokePal); @@ -2572,7 +2571,7 @@ void ShowContestEntryMonPic(void) taskId = CreateTask(Task_ShowContestEntryMonPic, 0x50); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = species; - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); LoadCompressedSpritePalette(palette); diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index a522ab13f..5824669ff 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -913,74 +913,74 @@ const u32 gMonFrontPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/fron const u32 gMonFrontPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/front.4bpp.lz"); const u32 gMonFrontPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/front.4bpp.lz"); const u32 gMonFrontPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/front.4bpp.lz"); -const u32 gMonFrontPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/front.4bpp.lz"); -const u32 gMonFrontPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/front.4bpp.lz"); -const u32 gMonFrontPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/front.4bpp.lz"); -const u32 gMonFrontPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/front.4bpp.lz"); -const u32 gMonFrontPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/front.4bpp.lz"); -const u32 gMonFrontPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/front.4bpp.lz"); -const u32 gMonFrontPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/front.4bpp.lz"); -const u32 gMonFrontPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/front.4bpp.lz"); -const u32 gMonFrontPic_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/front.4bpp.lz"); -const u32 gMonFrontPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/front.4bpp.lz"); -const u32 gMonFrontPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/front.4bpp.lz"); -const u32 gMonFrontPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/front.4bpp.lz"); -const u32 gMonFrontPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/front.4bpp.lz"); -const u32 gMonFrontPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/front.4bpp.lz"); -const u32 gMonFrontPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/front.4bpp.lz"); -const u32 gMonFrontPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/front.4bpp.lz"); -const u32 gMonFrontPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/front.4bpp.lz"); -const u32 gMonFrontPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/front.4bpp.lz"); -const u32 gMonFrontPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/front.4bpp.lz"); -const u32 gMonFrontPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/front.4bpp.lz"); -const u32 gMonFrontPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/front.4bpp.lz"); -const u32 gMonFrontPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/front.4bpp.lz"); -const u32 gMonFrontPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/front.4bpp.lz"); -const u32 gMonFrontPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/front.4bpp.lz"); -const u32 gMonFrontPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/front.4bpp.lz"); -const u32 gMonFrontPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/front.4bpp.lz"); -const u32 gMonFrontPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/front.4bpp.lz"); -const u32 gMonFrontPic_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/front.4bpp.lz"); -const u32 gMonFrontPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/front.4bpp.lz"); -const u32 gMonFrontPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/front.4bpp.lz"); -const u32 gMonFrontPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/front.4bpp.lz"); -const u32 gMonFrontPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/front.4bpp.lz"); -const u32 gMonFrontPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/front.4bpp.lz"); -const u32 gMonFrontPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/front.4bpp.lz"); -const u32 gMonFrontPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/front.4bpp.lz"); -const u32 gMonFrontPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/front.4bpp.lz"); -const u32 gMonFrontPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/front.4bpp.lz"); -const u32 gMonFrontPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/front.4bpp.lz"); -const u32 gMonFrontPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/front.4bpp.lz"); -const u32 gMonFrontPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/front.4bpp.lz"); -const u32 gMonFrontPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/front.4bpp.lz"); -const u32 gMonFrontPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/front.4bpp.lz"); -const u32 gMonFrontPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/front.4bpp.lz"); -const u32 gMonFrontPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/front.4bpp.lz"); -const u32 gMonFrontPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/front.4bpp.lz"); -const u32 gMonFrontPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/front.4bpp.lz"); -const u32 gMonFrontPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/front.4bpp.lz"); -const u32 gMonFrontPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/front.4bpp.lz"); -const u32 gMonFrontPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/front.4bpp.lz"); -const u32 gMonFrontPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/front.4bpp.lz"); -const u32 gMonFrontPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/front.4bpp.lz"); -const u32 gMonFrontPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/front.4bpp.lz"); -const u32 gMonFrontPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/front.4bpp.lz"); -const u32 gMonFrontPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/front.4bpp.lz"); -const u32 gMonFrontPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/front.4bpp.lz"); -const u32 gMonFrontPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/front.4bpp.lz"); -const u32 gMonFrontPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/front.4bpp.lz"); -const u32 gMonFrontPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/front.4bpp.lz"); -const u32 gMonFrontPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/front.4bpp.lz"); -const u32 gMonFrontPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/front.4bpp.lz"); -const u32 gMonFrontPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/front.4bpp.lz"); -const u32 gMonFrontPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/front.4bpp.lz"); -const u32 gMonFrontPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/front.4bpp.lz"); -const u32 gMonFrontPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/front.4bpp.lz"); -const u32 gMonFrontPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/front.4bpp.lz"); -const u32 gMonFrontPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/front.4bpp.lz"); -const u32 gMonFrontPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/front.4bpp.lz"); -const u32 gMonFrontPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/front.4bpp.lz"); +const u32 gMonFrontPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/front.4bpp.lz"); +const u32 gMonFrontPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/front.4bpp.lz"); +const u32 gMonFrontPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/front.4bpp.lz"); +const u32 gMonFrontPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/front.4bpp.lz"); +const u32 gMonFrontPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/front.4bpp.lz"); +const u32 gMonFrontPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/front.4bpp.lz"); +const u32 gMonFrontPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/front.4bpp.lz"); +const u32 gMonFrontPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/front.4bpp.lz"); +const u32 gMonFrontPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/front.4bpp.lz"); +const u32 gMonFrontPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/front.4bpp.lz"); +const u32 gMonFrontPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/front.4bpp.lz"); +const u32 gMonFrontPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/front.4bpp.lz"); +const u32 gMonFrontPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/front.4bpp.lz"); +const u32 gMonFrontPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/front.4bpp.lz"); +const u32 gMonFrontPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/front.4bpp.lz"); +const u32 gMonFrontPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/front.4bpp.lz"); +const u32 gMonFrontPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/front.4bpp.lz"); +const u32 gMonFrontPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/front.4bpp.lz"); +const u32 gMonFrontPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/front.4bpp.lz"); +const u32 gMonFrontPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/front.4bpp.lz"); +const u32 gMonFrontPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/front.4bpp.lz"); +const u32 gMonFrontPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/front.4bpp.lz"); +const u32 gMonFrontPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/front.4bpp.lz"); +const u32 gMonFrontPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/front.4bpp.lz"); +const u32 gMonFrontPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/front.4bpp.lz"); +const u32 gMonFrontPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/front.4bpp.lz"); +const u32 gMonFrontPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/front.4bpp.lz"); const u32 gMonFrontPic_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/front.4bpp.lz"); const u32 gMonFrontPic_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/front.4bpp.lz"); const u32 gMonFrontPic_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/front.4bpp.lz"); @@ -2069,74 +2069,74 @@ const u32 gMonBackPic_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/back. const u32 gMonBackPic_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/back.4bpp.lz"); const u32 gMonBackPic_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/back.4bpp.lz"); const u32 gMonBackPic_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/back.4bpp.lz"); -const u32 gMonBackPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/back.4bpp.lz"); -const u32 gMonBackPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/back.4bpp.lz"); -const u32 gMonBackPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/back.4bpp.lz"); -const u32 gMonBackPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/back.4bpp.lz"); -const u32 gMonBackPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/back.4bpp.lz"); -const u32 gMonBackPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/back.4bpp.lz"); -const u32 gMonBackPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/back.4bpp.lz"); -const u32 gMonBackPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/back.4bpp.lz"); -const u32 gMonBackPic_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/back.4bpp.lz"); -const u32 gMonBackPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/back.4bpp.lz"); -const u32 gMonBackPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/back.4bpp.lz"); -const u32 gMonBackPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/back.4bpp.lz"); -const u32 gMonBackPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/back.4bpp.lz"); -const u32 gMonBackPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/back.4bpp.lz"); -const u32 gMonBackPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/back.4bpp.lz"); -const u32 gMonBackPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/back.4bpp.lz"); -const u32 gMonBackPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/back.4bpp.lz"); -const u32 gMonBackPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/back.4bpp.lz"); -const u32 gMonBackPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/back.4bpp.lz"); -const u32 gMonBackPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/back.4bpp.lz"); -const u32 gMonBackPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/back.4bpp.lz"); -const u32 gMonBackPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/back.4bpp.lz"); -const u32 gMonBackPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/back.4bpp.lz"); -const u32 gMonBackPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/back.4bpp.lz"); -const u32 gMonBackPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/back.4bpp.lz"); -const u32 gMonBackPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/back.4bpp.lz"); -const u32 gMonBackPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/back.4bpp.lz"); -const u32 gMonBackPic_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/back.4bpp.lz"); -const u32 gMonBackPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/back.4bpp.lz"); -const u32 gMonBackPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/back.4bpp.lz"); -const u32 gMonBackPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/back.4bpp.lz"); -const u32 gMonBackPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/back.4bpp.lz"); -const u32 gMonBackPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/back.4bpp.lz"); -const u32 gMonBackPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/back.4bpp.lz"); -const u32 gMonBackPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/back.4bpp.lz"); -const u32 gMonBackPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/back.4bpp.lz"); -const u32 gMonBackPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/back.4bpp.lz"); -const u32 gMonBackPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/back.4bpp.lz"); -const u32 gMonBackPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/back.4bpp.lz"); -const u32 gMonBackPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/back.4bpp.lz"); -const u32 gMonBackPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/back.4bpp.lz"); -const u32 gMonBackPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/back.4bpp.lz"); -const u32 gMonBackPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/back.4bpp.lz"); -const u32 gMonBackPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/back.4bpp.lz"); -const u32 gMonBackPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/back.4bpp.lz"); -const u32 gMonBackPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/back.4bpp.lz"); -const u32 gMonBackPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/back.4bpp.lz"); -const u32 gMonBackPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/back.4bpp.lz"); -const u32 gMonBackPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/back.4bpp.lz"); -const u32 gMonBackPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/back.4bpp.lz"); -const u32 gMonBackPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/back.4bpp.lz"); -const u32 gMonBackPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/back.4bpp.lz"); -const u32 gMonBackPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/back.4bpp.lz"); -const u32 gMonBackPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/back.4bpp.lz"); -const u32 gMonBackPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/back.4bpp.lz"); -const u32 gMonBackPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/back.4bpp.lz"); -const u32 gMonBackPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/back.4bpp.lz"); -const u32 gMonBackPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/back.4bpp.lz"); -const u32 gMonBackPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/back.4bpp.lz"); -const u32 gMonBackPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/back.4bpp.lz"); -const u32 gMonBackPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/back.4bpp.lz"); -const u32 gMonBackPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/back.4bpp.lz"); -const u32 gMonBackPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/back.4bpp.lz"); -const u32 gMonBackPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/back.4bpp.lz"); -const u32 gMonBackPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/back.4bpp.lz"); -const u32 gMonBackPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/back.4bpp.lz"); -const u32 gMonBackPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/back.4bpp.lz"); -const u32 gMonBackPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/back.4bpp.lz"); +const u32 gMonBackPic_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/back.4bpp.lz"); +const u32 gMonBackPic_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/back.4bpp.lz"); +const u32 gMonBackPic_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/back.4bpp.lz"); +const u32 gMonBackPic_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/back.4bpp.lz"); +const u32 gMonBackPic_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/back.4bpp.lz"); +const u32 gMonBackPic_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/back.4bpp.lz"); +const u32 gMonBackPic_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/back.4bpp.lz"); +const u32 gMonBackPic_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/back.4bpp.lz"); +const u32 gMonBackPic_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/back.4bpp.lz"); +const u32 gMonBackPic_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/back.4bpp.lz"); +const u32 gMonBackPic_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/back.4bpp.lz"); +const u32 gMonBackPic_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/back.4bpp.lz"); +const u32 gMonBackPic_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/back.4bpp.lz"); +const u32 gMonBackPic_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/back.4bpp.lz"); +const u32 gMonBackPic_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/back.4bpp.lz"); +const u32 gMonBackPic_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/back.4bpp.lz"); +const u32 gMonBackPic_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/back.4bpp.lz"); +const u32 gMonBackPic_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/back.4bpp.lz"); +const u32 gMonBackPic_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/back.4bpp.lz"); +const u32 gMonBackPic_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/back.4bpp.lz"); +const u32 gMonBackPic_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/back.4bpp.lz"); +const u32 gMonBackPic_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/back.4bpp.lz"); +const u32 gMonBackPic_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/back.4bpp.lz"); +const u32 gMonBackPic_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/back.4bpp.lz"); +const u32 gMonBackPic_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/back.4bpp.lz"); +const u32 gMonBackPic_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/back.4bpp.lz"); +const u32 gMonBackPic_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/back.4bpp.lz"); +const u32 gMonBackPic_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/back.4bpp.lz"); +const u32 gMonBackPic_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/back.4bpp.lz"); +const u32 gMonBackPic_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/back.4bpp.lz"); +const u32 gMonBackPic_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/back.4bpp.lz"); +const u32 gMonBackPic_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/back.4bpp.lz"); +const u32 gMonBackPic_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/back.4bpp.lz"); +const u32 gMonBackPic_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/back.4bpp.lz"); +const u32 gMonBackPic_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/back.4bpp.lz"); +const u32 gMonBackPic_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/back.4bpp.lz"); +const u32 gMonBackPic_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/back.4bpp.lz"); +const u32 gMonBackPic_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/back.4bpp.lz"); +const u32 gMonBackPic_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/back.4bpp.lz"); +const u32 gMonBackPic_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/back.4bpp.lz"); +const u32 gMonBackPic_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/back.4bpp.lz"); +const u32 gMonBackPic_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/back.4bpp.lz"); +const u32 gMonBackPic_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/back.4bpp.lz"); +const u32 gMonBackPic_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/back.4bpp.lz"); +const u32 gMonBackPic_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/back.4bpp.lz"); +const u32 gMonBackPic_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/back.4bpp.lz"); +const u32 gMonBackPic_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/back.4bpp.lz"); +const u32 gMonBackPic_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/back.4bpp.lz"); +const u32 gMonBackPic_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/back.4bpp.lz"); +const u32 gMonBackPic_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/back.4bpp.lz"); +const u32 gMonBackPic_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/back.4bpp.lz"); +const u32 gMonBackPic_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/back.4bpp.lz"); +const u32 gMonBackPic_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/back.4bpp.lz"); +const u32 gMonBackPic_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/back.4bpp.lz"); +const u32 gMonBackPic_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/back.4bpp.lz"); +const u32 gMonBackPic_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/back.4bpp.lz"); +const u32 gMonBackPic_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/back.4bpp.lz"); +const u32 gMonBackPic_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/back.4bpp.lz"); +const u32 gMonBackPic_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/back.4bpp.lz"); +const u32 gMonBackPic_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/back.4bpp.lz"); +const u32 gMonBackPic_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/back.4bpp.lz"); +const u32 gMonBackPic_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/back.4bpp.lz"); +const u32 gMonBackPic_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/back.4bpp.lz"); const u32 gMonBackPic_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/back.4bpp.lz"); const u32 gMonBackPic_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/back.4bpp.lz"); const u32 gMonBackPic_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/back.4bpp.lz"); @@ -3217,74 +3217,74 @@ const u32 gMonPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/norma const u32 gMonPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/normal.gbapal.lz"); const u32 gMonPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/normal.gbapal.lz"); const u32 gMonPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/normal.gbapal.lz"); -const u32 gMonPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/normal.gbapal.lz"); -const u32 gMonPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/normal.gbapal.lz"); -const u32 gMonPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/normal.gbapal.lz"); -const u32 gMonPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/normal.gbapal.lz"); -const u32 gMonPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/normal.gbapal.lz"); -const u32 gMonPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/normal.gbapal.lz"); -const u32 gMonPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/normal.gbapal.lz"); -const u32 gMonPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/normal.gbapal.lz"); -const u32 gMonPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/normal.gbapal.lz"); -const u32 gMonPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/normal.gbapal.lz"); -const u32 gMonPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/normal.gbapal.lz"); -const u32 gMonPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/normal.gbapal.lz"); -const u32 gMonPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/normal.gbapal.lz"); -const u32 gMonPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/normal.gbapal.lz"); -const u32 gMonPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/normal.gbapal.lz"); -const u32 gMonPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/normal.gbapal.lz"); -const u32 gMonPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/normal.gbapal.lz"); -const u32 gMonPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/normal.gbapal.lz"); -const u32 gMonPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/normal.gbapal.lz"); -const u32 gMonPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/normal.gbapal.lz"); -const u32 gMonPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/normal.gbapal.lz"); -const u32 gMonPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/normal.gbapal.lz"); -const u32 gMonPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/normal.gbapal.lz"); -const u32 gMonPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/normal.gbapal.lz"); -const u32 gMonPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/normal.gbapal.lz"); -const u32 gMonPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/normal.gbapal.lz"); -const u32 gMonPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/normal.gbapal.lz"); -const u32 gMonPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/normal.gbapal.lz"); -const u32 gMonPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/normal.gbapal.lz"); -const u32 gMonPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/normal.gbapal.lz"); -const u32 gMonPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/normal.gbapal.lz"); -const u32 gMonPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/normal.gbapal.lz"); -const u32 gMonPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/normal.gbapal.lz"); -const u32 gMonPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/normal.gbapal.lz"); -const u32 gMonPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/normal.gbapal.lz"); -const u32 gMonPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/normal.gbapal.lz"); -const u32 gMonPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/normal.gbapal.lz"); -const u32 gMonPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/normal.gbapal.lz"); -const u32 gMonPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/normal.gbapal.lz"); -const u32 gMonPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/normal.gbapal.lz"); -const u32 gMonPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/normal.gbapal.lz"); -const u32 gMonPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/normal.gbapal.lz"); -const u32 gMonPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/normal.gbapal.lz"); -const u32 gMonPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/normal.gbapal.lz"); -const u32 gMonPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/normal.gbapal.lz"); -const u32 gMonPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/normal.gbapal.lz"); -const u32 gMonPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/normal.gbapal.lz"); -const u32 gMonPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/normal.gbapal.lz"); -const u32 gMonPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/normal.gbapal.lz"); -const u32 gMonPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/normal.gbapal.lz"); -const u32 gMonPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/normal.gbapal.lz"); -const u32 gMonPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/normal.gbapal.lz"); -const u32 gMonPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/normal.gbapal.lz"); -const u32 gMonPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/normal.gbapal.lz"); -const u32 gMonPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/normal.gbapal.lz"); -const u32 gMonPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/normal.gbapal.lz"); -const u32 gMonPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/normal.gbapal.lz"); -const u32 gMonPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/normal.gbapal.lz"); -const u32 gMonPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/normal.gbapal.lz"); -const u32 gMonPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/normal.gbapal.lz"); -const u32 gMonPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/normal.gbapal.lz"); -const u32 gMonPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/normal.gbapal.lz"); -const u32 gMonPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/normal.gbapal.lz"); -const u32 gMonPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/normal.gbapal.lz"); -const u32 gMonPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/normal.gbapal.lz"); -const u32 gMonPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/normal.gbapal.lz"); -const u32 gMonPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/normal.gbapal.lz"); -const u32 gMonPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/normal.gbapal.lz"); +const u32 gMonPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/normal.gbapal.lz"); +const u32 gMonPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/normal.gbapal.lz"); +const u32 gMonPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/normal.gbapal.lz"); +const u32 gMonPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/normal.gbapal.lz"); +const u32 gMonPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/normal.gbapal.lz"); +const u32 gMonPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/normal.gbapal.lz"); +const u32 gMonPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/normal.gbapal.lz"); +const u32 gMonPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/normal.gbapal.lz"); +const u32 gMonPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/normal.gbapal.lz"); +const u32 gMonPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/normal.gbapal.lz"); +const u32 gMonPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/normal.gbapal.lz"); +const u32 gMonPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/normal.gbapal.lz"); +const u32 gMonPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/normal.gbapal.lz"); +const u32 gMonPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/normal.gbapal.lz"); +const u32 gMonPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/normal.gbapal.lz"); +const u32 gMonPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/normal.gbapal.lz"); +const u32 gMonPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/normal.gbapal.lz"); +const u32 gMonPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/normal.gbapal.lz"); +const u32 gMonPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/normal.gbapal.lz"); +const u32 gMonPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/normal.gbapal.lz"); +const u32 gMonPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/normal.gbapal.lz"); +const u32 gMonPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/normal.gbapal.lz"); +const u32 gMonPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/normal.gbapal.lz"); +const u32 gMonPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/normal.gbapal.lz"); +const u32 gMonPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/normal.gbapal.lz"); +const u32 gMonPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/normal.gbapal.lz"); +const u32 gMonPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/normal.gbapal.lz"); +const u32 gMonPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/normal.gbapal.lz"); +const u32 gMonPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/normal.gbapal.lz"); +const u32 gMonPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/normal.gbapal.lz"); +const u32 gMonPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/normal.gbapal.lz"); +const u32 gMonPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/normal.gbapal.lz"); +const u32 gMonPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/normal.gbapal.lz"); +const u32 gMonPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/normal.gbapal.lz"); +const u32 gMonPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/normal.gbapal.lz"); +const u32 gMonPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/normal.gbapal.lz"); +const u32 gMonPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/normal.gbapal.lz"); +const u32 gMonPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/normal.gbapal.lz"); +const u32 gMonPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/normal.gbapal.lz"); +const u32 gMonPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/normal.gbapal.lz"); +const u32 gMonPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/normal.gbapal.lz"); +const u32 gMonPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/normal.gbapal.lz"); +const u32 gMonPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/normal.gbapal.lz"); +const u32 gMonPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/normal.gbapal.lz"); +const u32 gMonPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/normal.gbapal.lz"); +const u32 gMonPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/normal.gbapal.lz"); +const u32 gMonPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/normal.gbapal.lz"); +const u32 gMonPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/normal.gbapal.lz"); +const u32 gMonPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/normal.gbapal.lz"); +const u32 gMonPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/normal.gbapal.lz"); +const u32 gMonPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/normal.gbapal.lz"); +const u32 gMonPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/normal.gbapal.lz"); +const u32 gMonPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/normal.gbapal.lz"); +const u32 gMonPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/normal.gbapal.lz"); +const u32 gMonPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/normal.gbapal.lz"); +const u32 gMonPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/normal.gbapal.lz"); +const u32 gMonPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/normal.gbapal.lz"); +const u32 gMonPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/normal.gbapal.lz"); +const u32 gMonPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/normal.gbapal.lz"); +const u32 gMonPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/normal.gbapal.lz"); +const u32 gMonPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/normal.gbapal.lz"); +const u32 gMonPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/normal.gbapal.lz"); +const u32 gMonPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/normal.gbapal.lz"); const u32 gMonPalette_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/normal.gbapal.lz"); const u32 gMonPalette_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/normal.gbapal.lz"); const u32 gMonPalette_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/normal.gbapal.lz"); @@ -4392,74 +4392,74 @@ const u32 gMonShinyPalette_Regidrago[] = INCBIN_U32("graphics/pokemon/regidrago/ const u32 gMonShinyPalette_Glastrier[] = INCBIN_U32("graphics/pokemon/glastrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Spectrier[] = INCBIN_U32("graphics/pokemon/spectrier/shiny.gbapal.lz"); const u32 gMonShinyPalette_Calyrex[] = INCBIN_U32("graphics/pokemon/calyrex/shiny.gbapal.lz"); -const u32 gMonShinyPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/mega_venusaur/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/mega_charizard_x/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/mega_charizard_y/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/mega_blastoise/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/mega_beedrill/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/mega_pidgeot/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/mega_alakazam/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/mega_slowbro/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/mega_gengar/shiny.gbapal.lz"); -const u32 gMonShinyPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/mega_kangaskhan/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/mega_pinsir/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/mega_gyarados/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/mega_aerodactyl/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_x/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mega_mewtwo_y/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/mega_ampharos/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/mega_steelix/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/mega_scizor/shiny.gbapal.lz"); -const u32 gMonShinyPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/mega_heracross/shiny.gbapal.lz"); -const u32 gMonShinyPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/mega_houndoom/shiny.gbapal.lz"); -const u32 gMonShinyPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/mega_tyranitar/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/mega_sceptile/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/mega_blaziken/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/mega_swampert/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/mega_gardevoir/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/mega_sableye/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mega_mawile/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/mega_aggron/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/mega_medicham/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/mega_manectric/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/mega_sharpedo/shiny.gbapal.lz"); -const u32 gMonShinyPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/mega_camerupt/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/mega_altaria/shiny.gbapal.lz"); -const u32 gMonShinyPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/mega_banette/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/mega_absol/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/mega_glalie/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/mega_salamence/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/mega_metagross/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/mega_latias/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/mega_latios/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/mega_lopunny/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/mega_garchomp/shiny.gbapal.lz"); -const u32 gMonShinyPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/mega_lucario/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/mega_abomasnow/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/mega_gallade/shiny.gbapal.lz"); -const u32 gMonShinyPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/mega_audino/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/mega_diancie/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/mega_rayquaza/shiny.gbapal.lz"); -const u32 gMonShinyPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/primal_kyogre/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/primal_groudon/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/alolan_rattata/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raticate/shiny.gbapal.lz"); -const u32 gMonShinyPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/alolan_raichu/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandshrew/shiny.gbapal.lz"); -const u32 gMonShinyPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/alolan_sandslash/shiny.gbapal.lz"); -const u32 gMonShinyPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/alolan_vulpix/shiny.gbapal.lz"); -const u32 gMonShinyPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/alolan_ninetales/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/alolan_diglett/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/alolan_dugtrio/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/alolan_meowth/shiny.gbapal.lz"); -const u32 gMonShinyPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/alolan_persian/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/alolan_geodude/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_graveler/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/alolan_golem/shiny.gbapal.lz"); -const u32 gMonShinyPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/alolan_grimer/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/alolan_muk/shiny.gbapal.lz"); -const u32 gMonShinyPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/alolan_exeggutor/shiny.gbapal.lz"); -const u32 gMonShinyPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/alolan_marowak/shiny.gbapal.lz"); +const u32 gMonShinyPalette_VenusaurMega[] = INCBIN_U32("graphics/pokemon/venusaur/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CharizardMegaX[] = INCBIN_U32("graphics/pokemon/charizard/mega_x/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CharizardMegaY[] = INCBIN_U32("graphics/pokemon/charizard/mega_y/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BlastoiseMega[] = INCBIN_U32("graphics/pokemon/blastoise/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BeedrillMega[] = INCBIN_U32("graphics/pokemon/beedrill/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PidgeotMega[] = INCBIN_U32("graphics/pokemon/pidgeot/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AlakazamMega[] = INCBIN_U32("graphics/pokemon/alakazam/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SlowbroMega[] = INCBIN_U32("graphics/pokemon/slowbro/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GengarMega[] = INCBIN_U32("graphics/pokemon/gengar/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_KangaskhanMega[] = INCBIN_U32("graphics/pokemon/kangaskhan/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PinsirMega[] = INCBIN_U32("graphics/pokemon/pinsir/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GyaradosMega[] = INCBIN_U32("graphics/pokemon/gyarados/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AerodactylMega[] = INCBIN_U32("graphics/pokemon/aerodactyl/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MewtwoMegaX[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_x/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MewtwoMegaY[] = INCBIN_U32("graphics/pokemon/mewtwo/mega_y/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AmpharosMega[] = INCBIN_U32("graphics/pokemon/ampharos/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SteelixMega[] = INCBIN_U32("graphics/pokemon/steelix/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ScizorMega[] = INCBIN_U32("graphics/pokemon/scizor/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_HeracrossMega[] = INCBIN_U32("graphics/pokemon/heracross/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_HoundoomMega[] = INCBIN_U32("graphics/pokemon/houndoom/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_TyranitarMega[] = INCBIN_U32("graphics/pokemon/tyranitar/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SceptileMega[] = INCBIN_U32("graphics/pokemon/sceptile/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BlazikenMega[] = INCBIN_U32("graphics/pokemon/blaziken/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SwampertMega[] = INCBIN_U32("graphics/pokemon/swampert/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GardevoirMega[] = INCBIN_U32("graphics/pokemon/gardevoir/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SableyeMega[] = INCBIN_U32("graphics/pokemon/sableye/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MawileMega[] = INCBIN_U32("graphics/pokemon/mawile/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AggronMega[] = INCBIN_U32("graphics/pokemon/aggron/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MedichamMega[] = INCBIN_U32("graphics/pokemon/medicham/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ManectricMega[] = INCBIN_U32("graphics/pokemon/manectric/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SharpedoMega[] = INCBIN_U32("graphics/pokemon/sharpedo/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CameruptMega[] = INCBIN_U32("graphics/pokemon/camerupt/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AltariaMega[] = INCBIN_U32("graphics/pokemon/altaria/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_BanetteMega[] = INCBIN_U32("graphics/pokemon/banette/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AbsolMega[] = INCBIN_U32("graphics/pokemon/absol/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GlalieMega[] = INCBIN_U32("graphics/pokemon/glalie/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SalamenceMega[] = INCBIN_U32("graphics/pokemon/salamence/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MetagrossMega[] = INCBIN_U32("graphics/pokemon/metagross/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LatiasMega[] = INCBIN_U32("graphics/pokemon/latias/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LatiosMega[] = INCBIN_U32("graphics/pokemon/latios/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LopunnyMega[] = INCBIN_U32("graphics/pokemon/lopunny/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GarchompMega[] = INCBIN_U32("graphics/pokemon/garchomp/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_LucarioMega[] = INCBIN_U32("graphics/pokemon/lucario/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AbomasnowMega[] = INCBIN_U32("graphics/pokemon/abomasnow/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GalladeMega[] = INCBIN_U32("graphics/pokemon/gallade/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_AudinoMega[] = INCBIN_U32("graphics/pokemon/audino/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DiancieMega[] = INCBIN_U32("graphics/pokemon/diancie/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RayquazaMega[] = INCBIN_U32("graphics/pokemon/rayquaza/mega/shiny.gbapal.lz"); +const u32 gMonShinyPalette_KyogrePrimal[] = INCBIN_U32("graphics/pokemon/kyogre/primal/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GroudonPrimal[] = INCBIN_U32("graphics/pokemon/groudon/primal/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RattataAlolan[] = INCBIN_U32("graphics/pokemon/rattata/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RaticateAlolan[] = INCBIN_U32("graphics/pokemon/raticate/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_RaichuAlolan[] = INCBIN_U32("graphics/pokemon/raichu/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SandshrewAlolan[] = INCBIN_U32("graphics/pokemon/sandshrew/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_SandslashAlolan[] = INCBIN_U32("graphics/pokemon/sandslash/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_VulpixAlolan[] = INCBIN_U32("graphics/pokemon/vulpix/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_NinetalesAlolan[] = INCBIN_U32("graphics/pokemon/ninetales/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DiglettAlolan[] = INCBIN_U32("graphics/pokemon/diglett/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DugtrioAlolan[] = INCBIN_U32("graphics/pokemon/dugtrio/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MeowthAlolan[] = INCBIN_U32("graphics/pokemon/meowth/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_PersianAlolan[] = INCBIN_U32("graphics/pokemon/persian/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GeodudeAlolan[] = INCBIN_U32("graphics/pokemon/geodude/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GravelerAlolan[] = INCBIN_U32("graphics/pokemon/graveler/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GolemAlolan[] = INCBIN_U32("graphics/pokemon/golem/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_GrimerAlolan[] = INCBIN_U32("graphics/pokemon/grimer/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MukAlolan[] = INCBIN_U32("graphics/pokemon/muk/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_ExeggutorAlolan[] = INCBIN_U32("graphics/pokemon/exeggutor/alolan/shiny.gbapal.lz"); +const u32 gMonShinyPalette_MarowakAlolan[] = INCBIN_U32("graphics/pokemon/marowak/alolan/shiny.gbapal.lz"); const u32 gMonShinyPalette_MeowthGalarian[] = INCBIN_U32("graphics/pokemon/meowth/galarian/shiny.gbapal.lz"); const u32 gMonShinyPalette_PonytaGalarian[] = INCBIN_U32("graphics/pokemon/ponyta/galarian/shiny.gbapal.lz"); const u32 gMonShinyPalette_RapidashGalarian[] = INCBIN_U32("graphics/pokemon/rapidash/galarian/shiny.gbapal.lz"); @@ -5557,74 +5557,74 @@ const u8 gMonIcon_Regidrago[] = INCBIN_U8("graphics/pokemon/regidrago/icon.4bpp" const u8 gMonIcon_Glastrier[] = INCBIN_U8("graphics/pokemon/glastrier/icon.4bpp"); const u8 gMonIcon_Spectrier[] = INCBIN_U8("graphics/pokemon/spectrier/icon.4bpp"); //const u8 gMonIcon_Calyrex[] = INCBIN_U8("graphics/pokemon/calyrex/icon.4bpp"); -const u8 gMonIcon_VenusaurMega[] = INCBIN_U8("graphics/pokemon/mega_venusaur/icon.4bpp"); -const u8 gMonIcon_CharizardMegaX[] = INCBIN_U8("graphics/pokemon/mega_charizard_x/icon.4bpp"); -const u8 gMonIcon_CharizardMegaY[] = INCBIN_U8("graphics/pokemon/mega_charizard_y/icon.4bpp"); -const u8 gMonIcon_BlastoiseMega[] = INCBIN_U8("graphics/pokemon/mega_blastoise/icon.4bpp"); -const u8 gMonIcon_BeedrillMega[] = INCBIN_U8("graphics/pokemon/mega_beedrill/icon.4bpp"); -const u8 gMonIcon_PidgeotMega[] = INCBIN_U8("graphics/pokemon/mega_pidgeot/icon.4bpp"); -const u8 gMonIcon_AlakazamMega[] = INCBIN_U8("graphics/pokemon/mega_alakazam/icon.4bpp"); -const u8 gMonIcon_SlowbroMega[] = INCBIN_U8("graphics/pokemon/mega_slowbro/icon.4bpp"); -const u8 gMonIcon_GengarMega[] = INCBIN_U8("graphics/pokemon/mega_gengar/icon.4bpp"); -const u8 gMonIcon_KangaskhanMega[] = INCBIN_U8("graphics/pokemon/mega_kangaskhan/icon.4bpp"); -const u8 gMonIcon_PinsirMega[] = INCBIN_U8("graphics/pokemon/mega_pinsir/icon.4bpp"); -const u8 gMonIcon_GyaradosMega[] = INCBIN_U8("graphics/pokemon/mega_gyarados/icon.4bpp"); -const u8 gMonIcon_AerodactylMega[] = INCBIN_U8("graphics/pokemon/mega_aerodactyl/icon.4bpp"); -const u8 gMonIcon_MewtwoMegaX[] = INCBIN_U8("graphics/pokemon/mega_mewtwo_x/icon.4bpp"); -const u8 gMonIcon_MewtwoMegaY[] = INCBIN_U8("graphics/pokemon/mega_mewtwo_y/icon.4bpp"); -const u8 gMonIcon_AmpharosMega[] = INCBIN_U8("graphics/pokemon/mega_ampharos/icon.4bpp"); -const u8 gMonIcon_SteelixMega[] = INCBIN_U8("graphics/pokemon/mega_steelix/icon.4bpp"); -const u8 gMonIcon_ScizorMega[] = INCBIN_U8("graphics/pokemon/mega_scizor/icon.4bpp"); -const u8 gMonIcon_HeracrossMega[] = INCBIN_U8("graphics/pokemon/mega_heracross/icon.4bpp"); -const u8 gMonIcon_HoundoomMega[] = INCBIN_U8("graphics/pokemon/mega_houndoom/icon.4bpp"); -const u8 gMonIcon_TyranitarMega[] = INCBIN_U8("graphics/pokemon/mega_tyranitar/icon.4bpp"); -const u8 gMonIcon_SceptileMega[] = INCBIN_U8("graphics/pokemon/mega_sceptile/icon.4bpp"); -const u8 gMonIcon_BlazikenMega[] = INCBIN_U8("graphics/pokemon/mega_blaziken/icon.4bpp"); -const u8 gMonIcon_SwampertMega[] = INCBIN_U8("graphics/pokemon/mega_swampert/icon.4bpp"); -const u8 gMonIcon_GardevoirMega[] = INCBIN_U8("graphics/pokemon/mega_gardevoir/icon.4bpp"); -const u8 gMonIcon_SableyeMega[] = INCBIN_U8("graphics/pokemon/mega_sableye/icon.4bpp"); -const u8 gMonIcon_MawileMega[] = INCBIN_U8("graphics/pokemon/mega_mawile/icon.4bpp"); -const u8 gMonIcon_AggronMega[] = INCBIN_U8("graphics/pokemon/mega_aggron/icon.4bpp"); -const u8 gMonIcon_MedichamMega[] = INCBIN_U8("graphics/pokemon/mega_medicham/icon.4bpp"); -const u8 gMonIcon_ManectricMega[] = INCBIN_U8("graphics/pokemon/mega_manectric/icon.4bpp"); -const u8 gMonIcon_SharpedoMega[] = INCBIN_U8("graphics/pokemon/mega_sharpedo/icon.4bpp"); -const u8 gMonIcon_CameruptMega[] = INCBIN_U8("graphics/pokemon/mega_camerupt/icon.4bpp"); -const u8 gMonIcon_AltariaMega[] = INCBIN_U8("graphics/pokemon/mega_altaria/icon.4bpp"); -const u8 gMonIcon_BanetteMega[] = INCBIN_U8("graphics/pokemon/mega_banette/icon.4bpp"); -const u8 gMonIcon_AbsolMega[] = INCBIN_U8("graphics/pokemon/mega_absol/icon.4bpp"); -const u8 gMonIcon_GlalieMega[] = INCBIN_U8("graphics/pokemon/mega_glalie/icon.4bpp"); -const u8 gMonIcon_SalamenceMega[] = INCBIN_U8("graphics/pokemon/mega_salamence/icon.4bpp"); -const u8 gMonIcon_MetagrossMega[] = INCBIN_U8("graphics/pokemon/mega_metagross/icon.4bpp"); -const u8 gMonIcon_LatiasMega[] = INCBIN_U8("graphics/pokemon/mega_latias/icon.4bpp"); -const u8 gMonIcon_LatiosMega[] = INCBIN_U8("graphics/pokemon/mega_latios/icon.4bpp"); -const u8 gMonIcon_LopunnyMega[] = INCBIN_U8("graphics/pokemon/mega_lopunny/icon.4bpp"); -const u8 gMonIcon_GarchompMega[] = INCBIN_U8("graphics/pokemon/mega_garchomp/icon.4bpp"); -const u8 gMonIcon_LucarioMega[] = INCBIN_U8("graphics/pokemon/mega_lucario/icon.4bpp"); -const u8 gMonIcon_AbomasnowMega[] = INCBIN_U8("graphics/pokemon/mega_abomasnow/icon.4bpp"); -const u8 gMonIcon_GalladeMega[] = INCBIN_U8("graphics/pokemon/mega_gallade/icon.4bpp"); -const u8 gMonIcon_AudinoMega[] = INCBIN_U8("graphics/pokemon/mega_audino/icon.4bpp"); -const u8 gMonIcon_DiancieMega[] = INCBIN_U8("graphics/pokemon/mega_diancie/icon.4bpp"); -const u8 gMonIcon_RayquazaMega[] = INCBIN_U8("graphics/pokemon/mega_rayquaza/icon.4bpp"); -const u8 gMonIcon_KyogrePrimal[] = INCBIN_U8("graphics/pokemon/primal_kyogre/icon.4bpp"); -const u8 gMonIcon_GroudonPrimal[] = INCBIN_U8("graphics/pokemon/primal_groudon/icon.4bpp"); -const u8 gMonIcon_RattataAlolan[] = INCBIN_U8("graphics/pokemon/alolan_rattata/icon.4bpp"); -const u8 gMonIcon_RaticateAlolan[] = INCBIN_U8("graphics/pokemon/alolan_raticate/icon.4bpp"); -const u8 gMonIcon_RaichuAlolan[] = INCBIN_U8("graphics/pokemon/alolan_raichu/icon.4bpp"); -const u8 gMonIcon_SandshrewAlolan[] = INCBIN_U8("graphics/pokemon/alolan_sandshrew/icon.4bpp"); -const u8 gMonIcon_SandslashAlolan[] = INCBIN_U8("graphics/pokemon/alolan_sandslash/icon.4bpp"); -const u8 gMonIcon_VulpixAlolan[] = INCBIN_U8("graphics/pokemon/alolan_vulpix/icon.4bpp"); -const u8 gMonIcon_NinetalesAlolan[] = INCBIN_U8("graphics/pokemon/alolan_ninetales/icon.4bpp"); -const u8 gMonIcon_DiglettAlolan[] = INCBIN_U8("graphics/pokemon/alolan_diglett/icon.4bpp"); -const u8 gMonIcon_DugtrioAlolan[] = INCBIN_U8("graphics/pokemon/alolan_dugtrio/icon.4bpp"); -const u8 gMonIcon_MeowthAlolan[] = INCBIN_U8("graphics/pokemon/alolan_meowth/icon.4bpp"); -const u8 gMonIcon_PersianAlolan[] = INCBIN_U8("graphics/pokemon/alolan_persian/icon.4bpp"); -const u8 gMonIcon_GeodudeAlolan[] = INCBIN_U8("graphics/pokemon/alolan_geodude/icon.4bpp"); -const u8 gMonIcon_GravelerAlolan[] = INCBIN_U8("graphics/pokemon/alolan_graveler/icon.4bpp"); -const u8 gMonIcon_GolemAlolan[] = INCBIN_U8("graphics/pokemon/alolan_golem/icon.4bpp"); -const u8 gMonIcon_GrimerAlolan[] = INCBIN_U8("graphics/pokemon/alolan_grimer/icon.4bpp"); -const u8 gMonIcon_MukAlolan[] = INCBIN_U8("graphics/pokemon/alolan_muk/icon.4bpp"); -const u8 gMonIcon_ExeggutorAlolan[] = INCBIN_U8("graphics/pokemon/alolan_exeggutor/icon.4bpp"); -const u8 gMonIcon_MarowakAlolan[] = INCBIN_U8("graphics/pokemon/alolan_marowak/icon.4bpp"); +const u8 gMonIcon_VenusaurMega[] = INCBIN_U8("graphics/pokemon/venusaur/mega/icon.4bpp"); +const u8 gMonIcon_CharizardMegaX[] = INCBIN_U8("graphics/pokemon/charizard/mega_x/icon.4bpp"); +const u8 gMonIcon_CharizardMegaY[] = INCBIN_U8("graphics/pokemon/charizard/mega_y/icon.4bpp"); +const u8 gMonIcon_BlastoiseMega[] = INCBIN_U8("graphics/pokemon/blastoise/mega/icon.4bpp"); +const u8 gMonIcon_BeedrillMega[] = INCBIN_U8("graphics/pokemon/beedrill/mega/icon.4bpp"); +const u8 gMonIcon_PidgeotMega[] = INCBIN_U8("graphics/pokemon/pidgeot/mega/icon.4bpp"); +const u8 gMonIcon_AlakazamMega[] = INCBIN_U8("graphics/pokemon/alakazam/mega/icon.4bpp"); +const u8 gMonIcon_SlowbroMega[] = INCBIN_U8("graphics/pokemon/slowbro/mega/icon.4bpp"); +const u8 gMonIcon_GengarMega[] = INCBIN_U8("graphics/pokemon/gengar/mega/icon.4bpp"); +const u8 gMonIcon_KangaskhanMega[] = INCBIN_U8("graphics/pokemon/kangaskhan/mega/icon.4bpp"); +const u8 gMonIcon_PinsirMega[] = INCBIN_U8("graphics/pokemon/pinsir/mega/icon.4bpp"); +const u8 gMonIcon_GyaradosMega[] = INCBIN_U8("graphics/pokemon/gyarados/mega/icon.4bpp"); +const u8 gMonIcon_AerodactylMega[] = INCBIN_U8("graphics/pokemon/aerodactyl/mega/icon.4bpp"); +const u8 gMonIcon_MewtwoMegaX[] = INCBIN_U8("graphics/pokemon/mewtwo/mega_x/icon.4bpp"); +const u8 gMonIcon_MewtwoMegaY[] = INCBIN_U8("graphics/pokemon/mewtwo/mega_y/icon.4bpp"); +const u8 gMonIcon_AmpharosMega[] = INCBIN_U8("graphics/pokemon/ampharos/mega/icon.4bpp"); +const u8 gMonIcon_SteelixMega[] = INCBIN_U8("graphics/pokemon/steelix/mega/icon.4bpp"); +const u8 gMonIcon_ScizorMega[] = INCBIN_U8("graphics/pokemon/scizor/mega/icon.4bpp"); +const u8 gMonIcon_HeracrossMega[] = INCBIN_U8("graphics/pokemon/heracross/mega/icon.4bpp"); +const u8 gMonIcon_HoundoomMega[] = INCBIN_U8("graphics/pokemon/houndoom/mega/icon.4bpp"); +const u8 gMonIcon_TyranitarMega[] = INCBIN_U8("graphics/pokemon/tyranitar/mega/icon.4bpp"); +const u8 gMonIcon_SceptileMega[] = INCBIN_U8("graphics/pokemon/sceptile/mega/icon.4bpp"); +const u8 gMonIcon_BlazikenMega[] = INCBIN_U8("graphics/pokemon/blaziken/mega/icon.4bpp"); +const u8 gMonIcon_SwampertMega[] = INCBIN_U8("graphics/pokemon/swampert/mega/icon.4bpp"); +const u8 gMonIcon_GardevoirMega[] = INCBIN_U8("graphics/pokemon/gardevoir/mega/icon.4bpp"); +const u8 gMonIcon_SableyeMega[] = INCBIN_U8("graphics/pokemon/sableye/mega/icon.4bpp"); +const u8 gMonIcon_MawileMega[] = INCBIN_U8("graphics/pokemon/mawile/mega/icon.4bpp"); +const u8 gMonIcon_AggronMega[] = INCBIN_U8("graphics/pokemon/aggron/mega/icon.4bpp"); +const u8 gMonIcon_MedichamMega[] = INCBIN_U8("graphics/pokemon/medicham/mega/icon.4bpp"); +const u8 gMonIcon_ManectricMega[] = INCBIN_U8("graphics/pokemon/manectric/mega/icon.4bpp"); +const u8 gMonIcon_SharpedoMega[] = INCBIN_U8("graphics/pokemon/sharpedo/mega/icon.4bpp"); +const u8 gMonIcon_CameruptMega[] = INCBIN_U8("graphics/pokemon/camerupt/mega/icon.4bpp"); +const u8 gMonIcon_AltariaMega[] = INCBIN_U8("graphics/pokemon/altaria/mega/icon.4bpp"); +const u8 gMonIcon_BanetteMega[] = INCBIN_U8("graphics/pokemon/banette/mega/icon.4bpp"); +const u8 gMonIcon_AbsolMega[] = INCBIN_U8("graphics/pokemon/absol/mega/icon.4bpp"); +const u8 gMonIcon_GlalieMega[] = INCBIN_U8("graphics/pokemon/glalie/mega/icon.4bpp"); +const u8 gMonIcon_SalamenceMega[] = INCBIN_U8("graphics/pokemon/salamence/mega/icon.4bpp"); +const u8 gMonIcon_MetagrossMega[] = INCBIN_U8("graphics/pokemon/metagross/mega/icon.4bpp"); +const u8 gMonIcon_LatiasMega[] = INCBIN_U8("graphics/pokemon/latias/mega/icon.4bpp"); +const u8 gMonIcon_LatiosMega[] = INCBIN_U8("graphics/pokemon/latios/mega/icon.4bpp"); +const u8 gMonIcon_LopunnyMega[] = INCBIN_U8("graphics/pokemon/lopunny/mega/icon.4bpp"); +const u8 gMonIcon_GarchompMega[] = INCBIN_U8("graphics/pokemon/garchomp/mega/icon.4bpp"); +const u8 gMonIcon_LucarioMega[] = INCBIN_U8("graphics/pokemon/lucario/mega/icon.4bpp"); +const u8 gMonIcon_AbomasnowMega[] = INCBIN_U8("graphics/pokemon/abomasnow/mega/icon.4bpp"); +const u8 gMonIcon_GalladeMega[] = INCBIN_U8("graphics/pokemon/gallade/mega/icon.4bpp"); +const u8 gMonIcon_AudinoMega[] = INCBIN_U8("graphics/pokemon/audino/mega/icon.4bpp"); +const u8 gMonIcon_DiancieMega[] = INCBIN_U8("graphics/pokemon/diancie/mega/icon.4bpp"); +const u8 gMonIcon_RayquazaMega[] = INCBIN_U8("graphics/pokemon/rayquaza/mega/icon.4bpp"); +const u8 gMonIcon_KyogrePrimal[] = INCBIN_U8("graphics/pokemon/kyogre/primal/icon.4bpp"); +const u8 gMonIcon_GroudonPrimal[] = INCBIN_U8("graphics/pokemon/groudon/primal/icon.4bpp"); +const u8 gMonIcon_RattataAlolan[] = INCBIN_U8("graphics/pokemon/rattata/alolan/icon.4bpp"); +const u8 gMonIcon_RaticateAlolan[] = INCBIN_U8("graphics/pokemon/raticate/alolan/icon.4bpp"); +const u8 gMonIcon_RaichuAlolan[] = INCBIN_U8("graphics/pokemon/raichu/alolan/icon.4bpp"); +const u8 gMonIcon_SandshrewAlolan[] = INCBIN_U8("graphics/pokemon/sandshrew/alolan/icon.4bpp"); +const u8 gMonIcon_SandslashAlolan[] = INCBIN_U8("graphics/pokemon/sandslash/alolan/icon.4bpp"); +const u8 gMonIcon_VulpixAlolan[] = INCBIN_U8("graphics/pokemon/vulpix/alolan/icon.4bpp"); +const u8 gMonIcon_NinetalesAlolan[] = INCBIN_U8("graphics/pokemon/ninetales/alolan/icon.4bpp"); +const u8 gMonIcon_DiglettAlolan[] = INCBIN_U8("graphics/pokemon/diglett/alolan/icon.4bpp"); +const u8 gMonIcon_DugtrioAlolan[] = INCBIN_U8("graphics/pokemon/dugtrio/alolan/icon.4bpp"); +const u8 gMonIcon_MeowthAlolan[] = INCBIN_U8("graphics/pokemon/meowth/alolan/icon.4bpp"); +const u8 gMonIcon_PersianAlolan[] = INCBIN_U8("graphics/pokemon/persian/alolan/icon.4bpp"); +const u8 gMonIcon_GeodudeAlolan[] = INCBIN_U8("graphics/pokemon/geodude/alolan/icon.4bpp"); +const u8 gMonIcon_GravelerAlolan[] = INCBIN_U8("graphics/pokemon/graveler/alolan/icon.4bpp"); +const u8 gMonIcon_GolemAlolan[] = INCBIN_U8("graphics/pokemon/golem/alolan/icon.4bpp"); +const u8 gMonIcon_GrimerAlolan[] = INCBIN_U8("graphics/pokemon/grimer/alolan/icon.4bpp"); +const u8 gMonIcon_MukAlolan[] = INCBIN_U8("graphics/pokemon/muk/alolan/icon.4bpp"); +const u8 gMonIcon_ExeggutorAlolan[] = INCBIN_U8("graphics/pokemon/exeggutor/alolan/icon.4bpp"); +const u8 gMonIcon_MarowakAlolan[] = INCBIN_U8("graphics/pokemon/marowak/alolan/icon.4bpp"); const u8 gMonIcon_MeowthGalarian[] = INCBIN_U8("graphics/pokemon/meowth/galarian/icon.4bpp"); const u8 gMonIcon_PonytaGalarian[] = INCBIN_U8("graphics/pokemon/ponyta/galarian/icon.4bpp"); const u8 gMonIcon_RapidashGalarian[] = INCBIN_U8("graphics/pokemon/rapidash/galarian/icon.4bpp"); diff --git a/src/data/items.h b/src/data/items.h index 3a3980a6b..08060db77 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -1371,10 +1371,11 @@ const struct Item gItems[] = .name = _("Exp.Candy XS"), .itemId = ITEM_EXP_CANDY_XS, .price = 20, + .holdEffectParam = EXP_100, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1383,10 +1384,11 @@ const struct Item gItems[] = .name = _("Exp.Candy S"), .itemId = ITEM_EXP_CANDY_S, .price = 240, + .holdEffectParam = EXP_800, .description = sExpCandyXSDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1395,10 +1397,11 @@ const struct Item gItems[] = .name = _("Exp.Candy M"), .itemId = ITEM_EXP_CANDY_M, .price = 1000, + .holdEffectParam = EXP_3000, .description = sExpCandyMDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1407,10 +1410,11 @@ const struct Item gItems[] = .name = _("Exp.Candy L"), .itemId = ITEM_EXP_CANDY_L, .price = 3000, + .holdEffectParam = EXP_10000, .description = sExpCandyLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, @@ -1419,10 +1423,11 @@ const struct Item gItems[] = .name = _("Exp.Candy XL"), .itemId = ITEM_EXP_CANDY_XL, .price = 10000, + .holdEffectParam = EXP_30000, .description = sExpCandyXLDesc, .pocket = POCKET_ITEMS, - .type = ITEM_USE_BAG_MENU, - .fieldUseFunc = ItemUseOutOfBattle_CannotUse, // Todo + .type = ITEM_USE_PARTY_MENU, + .fieldUseFunc = ItemUseOutOfBattle_RareCandy, .flingPower = 30, }, diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index f2290351a..2651b4daf 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -510,11 +510,11 @@ const u8 *const gItemEffectTable[] = // Candy [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, - //[ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_ExpCandy, // Todo - //[ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_ExpCandy, // Todo + [ITEM_EXP_CANDY_XS - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_S - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_M - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_L - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_EXP_CANDY_XL - ITEM_POTION] = gItemEffect_RareCandy, //[ITEM_DYNAMAX_CANDY - ITEM_POTION] = gItemEffect_DynamaxCandy, // Todo // Medicinal Flutes diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 1739a8557..25cae92e3 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -2953,8 +2953,9 @@ static const u8 sEerieSpellDescription[] = _( "Attacks with psychic power.\n" "Foe's last move has 3 PP cut."); -static const u8 sNotDoneYetDescription[] = _( - "Not done yet."); +const u8 gNotDoneYetDescription[] = _( + "This move can't be used. Its\n" + "effect is in development."); #undef BINDING_TURNS diff --git a/src/decompress.c b/src/decompress.c index 4f17edcf8..c94f74862 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -70,25 +70,18 @@ void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffe void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) DecompressPicFromTable(&gMonFrontPicTableFemale[species], buffer, species); else DecompressPicFromTable(&gMonFrontPicTable[species], buffer, species); } -void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality) +void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 personality) { - bool8 isFrontPic; - - if (src == &gMonFrontPicTable[species]) - isFrontPic = TRUE; // frontPic - else - isFrontPic = FALSE; // backPic - - LoadSpecialPokePic(src, dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } -void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic) +void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic) { if (species == SPECIES_UNOWN) { @@ -100,8 +93,13 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 LZ77UnCompWram(gMonFrontPicTable[id].data, dest); } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon - LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else + LZ77UnCompWram(gMonBackPicTable[0].data, dest); + } + else if (ShouldShowFemaleDifferences(species, personality)) { if (isFrontPic) LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); @@ -109,49 +107,15 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); } else - LZ77UnCompWram(src->data, dest); - - DrawSpindaSpots(species, personality, dest, isFrontPic); -} - -#if P_ENABLE_DEBUG == TRUE -static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) -{ - if (species == SPECIES_UNOWN) - { - u32 id = GetUnownSpeciesId(personality); - - if (!isFrontPic) - LZ77UnCompWram(gMonBackPicTable[id].data, dest); - else - LZ77UnCompWram(gMonFrontPicTable[id].data, dest); - } - else if (species > NUM_SPECIES) // is species unknown? draw the ? icon - LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) { if (isFrontPic) - LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + LZ77UnCompWram(gMonFrontPicTable[species].data, dest); else - LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + LZ77UnCompWram(gMonBackPicTable[species].data, dest); } - else - LZ77UnCompWram(src->data, dest); DrawSpindaSpots(species, personality, dest, isFrontPic); } -void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale) -{ - bool8 isFrontPic; - - if (src == &gMonFrontPicTable[species]) - isFrontPic = TRUE; // frontPic - else - isFrontPic = FALSE; // backPic - - LoadSpecialPokePicCustom(src, dest, species, personality, isFrontPic, isFemale); -} -#endif void Unused_LZDecompressWramIndirect(const void **src, void *dest) { diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e280ef315..b7ae2e2ce 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -444,7 +444,7 @@ static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16 *speciesL { u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[(useAlt * 2) + B_POSITION_OPPONENT_LEFT], species, pid); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); diff --git a/src/field_specials.c b/src/field_specials.c index 7c226e7a3..7931a5029 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -65,6 +65,7 @@ #include "constants/weather.h" #include "constants/metatile_labels.h" #include "palette.h" +#include "battle_util.h" EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE; EWRAM_DATA u8 gBikeCollisions = 0; @@ -939,21 +940,7 @@ u16 GetWeekCount(void) u8 GetLeadMonFriendshipScore(void) { - struct Pokemon *pokemon = &gPlayerParty[GetLeadMonIndex()]; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) - return 6; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) - return 5; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) - return 4; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) - return 3; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) - return 2; - if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) - return 1; - - return 0; + return GetMonFriendshipScore(&gPlayerParty[GetLeadMonIndex()]); } static void CB2_FieldShowRegionMap(void) diff --git a/src/graphics.c b/src/graphics.c index 9e858deec..7ccd0d579 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2033,12 +2033,3 @@ const u16 gFrontierPassCancelButtonHighlighted_Tilemap[] = INCBIN_U16("graphics/ const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal"); const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz"); const u32 gBerryCrush_TextWindows_Tilemap[] = INCBIN_U32("graphics/berry_crush/text_windows.bin.lz"); - -// random garbage at the end. -static const u8 sEmpty3[0x54BAC] = {0}; -static const u8 sUnused1[] = {0x0D, 0x00, 0x58, 0x02}; -static const u8 sEmpty4[0x1145] = {0}; -static const u8 sUnused2[] = {0x02}; -static const u8 sEmpty5[0x3242] = {0}; -static const u8 sUnused3[] = {0x40}; -static const u8 sEmpty6[0x13] = {0}; diff --git a/src/item_use.c b/src/item_use.c index 023396ffa..bcc869c7a 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -922,6 +922,9 @@ static void ItemUseOnFieldCB_EscapeRope(u8 taskId) Overworld_ResetStateAfterDigEscRope(); #if I_KEY_ESCAPE_ROPE < GEN_8 RemoveUsedItem(); + #else + CopyItemName(gSpecialVar_ItemId, gStringVar2); + StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2); #endif gTasks[taskId].data[0] = 0; DisplayItemMessageOnField(taskId, gStringVar4, Task_UseDigEscapeRopeOnField); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 42c80b5ee..d844b8225 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -24,6 +24,7 @@ #include "trig.h" #include "window.h" #include "constants/songs.h" +#include "constants/battle_move_effects.h" #include "gba/io_reg.h" extern const struct CompressedSpriteSheet gMonFrontPicTable[]; @@ -807,7 +808,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) } AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL); - str = gMoveDescriptionPointers[chosenMove - 1]; + if (move->effect != EFFECT_PLACEHOLDER) + str = gMoveDescriptionPointers[chosenMove - 1]; + else + str = gNotDoneYetDescription; + AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); } @@ -1075,7 +1080,7 @@ void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE); + LoadSpecialPokePic(tilesDst, species, personality, TRUE); LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst); } } diff --git a/src/party_menu.c b/src/party_menu.c index db20e0932..38b477b3c 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -225,6 +225,8 @@ EWRAM_DATA u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE] = {0}; static EWRAM_DATA u16 sPartyMenuItemId = 0; static EWRAM_DATA u16 sUnused = 0; EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on +static EWRAM_DATA u8 sInitialLevel = 0; +static EWRAM_DATA u8 sFinalLevel = 0; // IWRAM common void (*gItemUseCB)(u8, TaskFunc); @@ -270,7 +272,7 @@ static u8 CanMonLearnTMTutor(struct Pokemon *, u16, u8); static void DisplayPartyPokemonBarDetail(u8, const u8 *, u8, const u8 *); static void DisplayPartyPokemonLevel(u8, struct PartyMenuBox *); static void DisplayPartyPokemonGender(u8, u16, u8 *, struct PartyMenuBox *); -static void DisplayPartyPokemonHP(u16, struct PartyMenuBox *); +static void DisplayPartyPokemonHP(u16 hp, u16 maxHp, struct PartyMenuBox *menuBox); static void DisplayPartyPokemonMaxHP(u16, struct PartyMenuBox *); static void DisplayPartyPokemonHPBar(u16, u16, struct PartyMenuBox *); static void CreatePartyMonIconSpriteParameterized(u16, u32, struct PartyMenuBox *, u8); @@ -1032,7 +1034,7 @@ static void DisplayPartyPokemonDataForMultiBattle(u8 slot) DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); DisplayPartyPokemonGender(gMultiPartnerParty[actualSlot].gender, gMultiPartnerParty[actualSlot].species, gMultiPartnerParty[actualSlot].nickname, menuBox); - DisplayPartyPokemonHP(gMultiPartnerParty[actualSlot].hp, menuBox); + DisplayPartyPokemonHP(gMultiPartnerParty[actualSlot].hp, gMultiPartnerParty[actualSlot].maxhp, menuBox); DisplayPartyPokemonMaxHP(gMultiPartnerParty[actualSlot].maxhp, menuBox); DisplayPartyPokemonHPBar(gMultiPartnerParty[actualSlot].hp, gMultiPartnerParty[actualSlot].maxhp, menuBox); } @@ -2359,18 +2361,31 @@ static void DisplayPartyPokemonHPCheck(struct Pokemon *mon, struct PartyMenuBox if (c != 0) menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->dimensions[12] >> 3, (menuBox->infoRects->dimensions[13] >> 3) + 1, menuBox->infoRects->dimensions[14] >> 3, menuBox->infoRects->dimensions[15] >> 3, FALSE); if (c != 2) - DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), menuBox); + DisplayPartyPokemonHP(GetMonData(mon, MON_DATA_HP), GetMonData(mon, MON_DATA_MAX_HP), menuBox); } } -static void DisplayPartyPokemonHP(u16 hp, struct PartyMenuBox *menuBox) +static void DisplayParty4DigitsHP(struct PartyMenuBox *menuBox, const u8 *str, const u8 *origAlings, u32 toSub) { - u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, 3); + u8 newAligns[4]; + + memcpy(newAligns, origAlings, sizeof(newAligns)); + newAligns[0] -= toSub; // x, so that the hp fits + DisplayPartyPokemonBarDetail(menuBox->windowId, str, 0, newAligns); +} + +static void DisplayPartyPokemonHP(u16 hp, u16 maxhp, struct PartyMenuBox *menuBox) +{ + bool32 fourDigits = (maxhp >= 1000); + u8 *strOut = ConvertIntToDecimalStringN(gStringVar1, hp, STR_CONV_MODE_RIGHT_ALIGN, fourDigits ? 4 : 3); strOut[0] = CHAR_SLASH; strOut[1] = EOS; - DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[12]); + if (fourDigits) + DisplayParty4DigitsHP(menuBox, gStringVar1, &menuBox->infoRects->dimensions[12], 10); + else + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[12]); } static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) @@ -2386,10 +2401,16 @@ static void DisplayPartyPokemonMaxHPCheck(struct Pokemon *mon, struct PartyMenuB static void DisplayPartyPokemonMaxHP(u16 maxhp, struct PartyMenuBox *menuBox) { - ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, 3); + bool32 fourDigits = (maxhp >= 1000); + + ConvertIntToDecimalStringN(gStringVar2, maxhp, STR_CONV_MODE_RIGHT_ALIGN, fourDigits ? 4 : 3); StringCopy(gStringVar1, gText_Slash); StringAppend(gStringVar1, gStringVar2); - DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); + + if (fourDigits) + DisplayParty4DigitsHP(menuBox, gStringVar1, &menuBox->infoRects->dimensions[16], 5); + else + DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, &menuBox->infoRects->dimensions[16]); } static void DisplayPartyPokemonHPBarCheck(struct Pokemon *mon, struct PartyMenuBox *menuBox) @@ -5052,6 +5073,7 @@ static void CB2_ShowSummaryScreenToForgetMove(void) static void CB2_ReturnToPartyMenuWhileLearningMove(void) { + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback); } @@ -5157,8 +5179,9 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) s16 *arrayPtr = ptr->data; u16 *itemPtr = &gSpecialVar_ItemId; bool8 cannotUseEffect; + sInitialLevel = GetMonData(mon, MON_DATA_LEVEL); - if (GetMonData(mon, MON_DATA_LEVEL) != MAX_LEVEL) + if (sInitialLevel != MAX_LEVEL) { BufferMonStatsToTaskData(mon, arrayPtr); cannotUseEffect = ExecuteTableBasedItemEffect_(gPartyMenu.slotId, *itemPtr, 0); @@ -5178,16 +5201,29 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task) } else { + sFinalLevel = GetMonData(mon, MON_DATA_LEVEL, NULL); gPartyMenuUseExitCallback = TRUE; - PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); GetMonNickname(mon, gStringVar1); - ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), STR_CONV_MODE_LEFT_ALIGN, 3); - StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); - DisplayPartyMenuMessage(gStringVar4, TRUE); - ScheduleBgCopyTilemapToVram(2); - gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; + if (sFinalLevel > sInitialLevel) + { + PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); + ConvertIntToDecimalStringN(gStringVar2, sFinalLevel, STR_CONV_MODE_LEFT_ALIGN, 3); + StringExpandPlaceholders(gStringVar4, gText_PkmnElevatedToLvVar2); + DisplayPartyMenuMessage(gStringVar4, TRUE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = Task_DisplayLevelUpStatsPg1; + } + else + { + PlaySE(SE_USE_ITEM); + gPartyMenuUseExitCallback = FALSE; + StringExpandPlaceholders(gStringVar4, gText_PkmnGainedExp); + DisplayPartyMenuMessage(gStringVar4, FALSE); + ScheduleBgCopyTilemapToVram(2); + gTasks[taskId].func = task; + } } } @@ -5220,6 +5256,7 @@ static void Task_DisplayLevelUpStatsPg2(u8 taskId) { PlaySE(SE_SELECT); DisplayLevelUpStatsPg2(taskId); + sInitialLevel += 1; // so the Pokemon doesn't learn a move meant for its previous level gTasks[taskId].func = Task_TryLearnNewMoves; } } @@ -5250,44 +5287,58 @@ static void Task_TryLearnNewMoves(u8 taskId) if (WaitFanfare(FALSE) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))) { RemoveLevelUpStatsWindow(); - learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); - gPartyMenu.learnMoveState = 1; - switch (learnMove) + for (; sInitialLevel <= sFinalLevel; sInitialLevel++) { - case 0: // No moves to learn - PartyMenuTryEvolution(taskId); - break; - case MON_HAS_MAX_MOVES: - DisplayMonNeedsToReplaceMove(taskId); - break; - case MON_ALREADY_KNOWS_MOVE: - gTasks[taskId].func = Task_TryLearningNextMove; - break; - default: - DisplayMonLearnedMove(taskId, learnMove); - break; + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); + learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE); + gPartyMenu.learnMoveState = 1; + switch (learnMove) + { + case 0: // No moves to learn + if (sInitialLevel >= sFinalLevel) + PartyMenuTryEvolution(taskId); + break; + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); + break; + case MON_ALREADY_KNOWS_MOVE: + gTasks[taskId].func = Task_TryLearningNextMove; + break; + default: + DisplayMonLearnedMove(taskId, learnMove); + break; + } + if (learnMove) + break; } } } static void Task_TryLearningNextMove(u8 taskId) { - u16 result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); - - switch (result) + u16 result; + for (; sInitialLevel <= sFinalLevel; sInitialLevel++) { - case 0: // No moves to learn - PartyMenuTryEvolution(taskId); - break; - case MON_HAS_MAX_MOVES: - DisplayMonNeedsToReplaceMove(taskId); - break; - case MON_ALREADY_KNOWS_MOVE: - return; - default: - DisplayMonLearnedMove(taskId, result); - break; + SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sInitialLevel); + result = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], FALSE); + switch (result) + { + case 0: // No moves to learn + break; + case MON_HAS_MAX_MOVES: + DisplayMonNeedsToReplaceMove(taskId); + break; + case MON_ALREADY_KNOWS_MOVE: + return; + default: + DisplayMonLearnedMove(taskId, result); + break; + } + if (result) + break; } + if (sInitialLevel >= sFinalLevel) + PartyMenuTryEvolution(taskId); } static void PartyMenuTryEvolution(u8 taskId) @@ -6115,7 +6166,7 @@ void ChooseMonForWirelessMinigame(void) static u8 GetPartyLayoutFromBattleType(void) { - if (IsDoubleBattle() == FALSE) + if (!IsDoubleBattle() || gPlayerPartyCount == 1) // Draw the single layout in a double battle where the player has only one pokemon. return PARTY_LAYOUT_SINGLE; if (IsMultiBattle() == TRUE) return PARTY_LAYOUT_MULTI; diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 00597e8d3..46355e146 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -727,7 +727,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon) // Load mon gfx species = GetMonData(mon, MON_DATA_SPECIES2); personality = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); sPokeblockFeed->loadGfxState++; break; case 1: diff --git a/src/pokemon.c b/src/pokemon.c index ae5c2f802..9dec50533 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5476,6 +5476,15 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, #define X_ITEM_STAGES 1 #endif +// EXP candies store an index for this table in their holdEffectParam. +static const u32 sExpCandyExperienceTable[] = { + [EXP_100 - 1] = 100, + [EXP_800 - 1] = 800, + [EXP_3000 - 1] = 3000, + [EXP_10000 - 1] = 10000, + [EXP_30000 - 1] = 30000, +}; + // Returns TRUE if the item has no effect on the Pokémon, FALSE otherwise bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) { @@ -5652,11 +5661,22 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } - // Rare Candy + // Rare Candy / EXP Candy if ((itemEffect[i] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + u8 param = ItemId_GetHoldEffectParam(item); + if (param == 0) // Rare Candy + { + dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + } + else if (param < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies + { + u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + dataUnsigned = sExpCandyExperienceTable[param - 1] + GetMonData(mon, MON_DATA_EXP, NULL); + if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]) + dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL]; + } SetMonData(mon, MON_DATA_EXP, &dataUnsigned); CalculateMonStats(mon); retVal = FALSE; @@ -7508,14 +7528,14 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return gMonShinyPaletteTableFemale[species].data; else return gMonShinyPaletteTable[species].data; } else { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return gMonPaletteTableFemale[species].data; else return gMonPaletteTable[species].data; @@ -7537,14 +7557,14 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return &gMonShinyPaletteTableFemale[species]; else return &gMonShinyPaletteTable[species]; } else { - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) return &gMonPaletteTableFemale[species]; else return &gMonPaletteTable[species]; @@ -8347,3 +8367,8 @@ void TrySpecialOverworldEvo(void) sTriedEvolving = 0; SetMainCallback2(CB2_ReturnToField); } + +bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) +{ + return (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; +} diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index fa4460ed8..8775889fd 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1107,6 +1107,9 @@ static void ResetPokemonDebugWindows(void) } } +#define MALE_PERSONALITY 0xFE +#define FEMALE_PERSONALITY 0X0 + void CB2_Debug_Pokemon(void) { u8 taskId; @@ -1180,7 +1183,7 @@ void CB2_Debug_Pokemon(void) palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); //Front - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); data->isShiny = FALSE; data->isFemale = FALSE; BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); @@ -1195,7 +1198,7 @@ void CB2_Debug_Pokemon(void) LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4); SetMultiuseSpriteTemplateToPokemon(species, 2); offset_y = gMonBackPicCoords[species].y_offset; @@ -1205,7 +1208,7 @@ void CB2_Debug_Pokemon(void) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows @@ -1692,7 +1695,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); //Front - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -1705,7 +1708,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 5); SetMultiuseSpriteTemplateToPokemon(species, 2); offset_y = gMonBackPicCoords[species].y_offset; @@ -1715,7 +1718,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY)); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 291f3f861..51e1809aa 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -23,10 +23,6 @@ struct MonIconSpriteTemplate static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); static void FreeAndDestroyMonIconSprite_(struct Sprite *sprite); -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); -static const u8 *GetMonIconTilesCustom(u16 species, bool8 isFemale); -#endif const u8 *const gMonIconTable[] = { @@ -2162,7 +2158,7 @@ const u8 gMonIconPaletteIndices[] = [SPECIES_URSHIFU] = 2, [SPECIES_ZARUDE] = 1, [SPECIES_REGIELEKI] = 0, - [SPECIES_REGIDRAGO] = 2, + [SPECIES_REGIDRAGO] = 0, [SPECIES_GLASTRIER] = 0, [SPECIES_SPECTRIER] = 0, [SPECIES_CALYREX] = 0, @@ -2596,7 +2592,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u if (species > NUM_SPECIES) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + else if (ShouldShowFemaleDifferences(species, personality)) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2606,32 +2602,6 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } -#if P_ENABLE_DEBUG == TRUE -u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) -{ - u8 spriteId; - struct MonIconSpriteTemplate iconTemplate = - { - .oam = &sMonIconOamData, - .image = GetMonIconPtrCustom(species, personality, isFemale), - .anims = sMonIconAnims, - .affineAnims = sMonIconAffineAnims, - .callback = callback, - .paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndices[species], - }; - - if (species > NUM_SPECIES) - iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) - iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; - - spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); - - UpdateMonIconFrame(&gSprites[spriteId]); - - return spriteId; -} -#endif u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) { @@ -2704,13 +2674,6 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) -{ - return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); -} -#endif - void FreeAndDestroyMonIconSprite(struct Sprite *sprite) { FreeAndDestroyMonIconSprite_(sprite); @@ -2772,24 +2735,15 @@ void SpriteCB_MonIcon(struct Sprite *sprite) const u8 *GetMonIconTiles(u16 species, u32 personality) { - const u8 *iconSprite = gMonIconTable[species]; - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) - { + const u8 *iconSprite; + + if (ShouldShowFemaleDifferences(species, personality)) iconSprite = gMonIconTableFemale[species]; - } + else + iconSprite = gMonIconTable[species]; + return iconSprite; } -#if P_ENABLE_DEBUG == TRUE -static const u8 *GetMonIconTilesCustom(u16 species, bool8 isFemale) -{ - const u8 *iconSprite = gMonIconTable[species]; - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) - { - iconSprite = gMonIconTableFemale[species]; - } - return iconSprite; -} -#endif void TryLoadAllMonIconPalettesAtOffset(u16 offset) { diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index e3ae6623c..ccd3125e4 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2905,11 +2905,10 @@ static void CreateJumpMonSprite(struct PokemonJumpGfx *jumpGfx, struct PokemonJu if (buffer && unusedBuffer) { - HandleLoadSpecialPokePic( - &gMonFrontPicTable[monInfo->species], - buffer, - monInfo->species, - monInfo->personality); + HandleLoadSpecialPokePic(TRUE, + buffer, + monInfo->species, + monInfo->personality); spriteSheet.data = buffer; spriteSheet.tag = multiplayerId; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 39b55463c..7f515eba7 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -3991,7 +3991,7 @@ static void LoadDisplayMonGfx(u16 species, u32 pid) if (species != SPECIES_NONE) { - LoadSpecialPokePic(&gMonFrontPicTable[species], sStorage->tileBuffer, species, pid, TRUE); + LoadSpecialPokePic(sStorage->tileBuffer, species, pid, TRUE); LZ77UnCompWram(sStorage->displayMonPalette, sStorage->displayMonPalBuffer); CpuCopy32(sStorage->tileBuffer, sStorage->displayMonTilePtr, MON_PIC_SIZE); LoadPalette(sStorage->displayMonPalBuffer, sStorage->displayMonPalOffset, 0x20); @@ -5109,7 +5109,7 @@ static u16 TryLoadMonIconTiles(u16 species, u32 personality) u16 i, offset; // Treat female mons as a seperate species as they may have a different icon than males - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) species |= 0x8000; // 1 << 15 // Search icon list for this species @@ -5176,7 +5176,7 @@ static struct Sprite *CreateMonIconSprite(u16 species, u32 personality, s16 x, s struct SpriteTemplate template = sSpriteTemplate_MonIcon; species = GetIconSpecies(species, personality); - if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if (ShouldShowFemaleDifferences(species, personality)) { template.paletteTag = PALTAG_MON_ICON_0 + gMonIconPaletteIndicesFemale[species]; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 580ca8803..66bfa817c 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -41,13 +41,14 @@ #include "text.h" #include "tv.h" #include "window.h" +#include "constants/battle_config.h" +#include "constants/battle_move_effects.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/party_menu.h" #include "constants/region_map_sections.h" #include "constants/rgb.h" #include "constants/songs.h" -#include "constants/battle_config.h" enum { PSS_PAGE_INFO, @@ -3730,16 +3731,22 @@ static void PrintContestMoveDescription(u8 moveSlot) static void PrintMoveDetails(u16 move) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, PSS_DATA_WINDOW_MOVE_DESCRIPTION); + u8 moveEffect; FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); if (move != MOVE_NONE) { if (sMonSummaryScreen->currPageIndex == PSS_PAGE_BATTLE_MOVES) { + moveEffect = gBattleMoves[move].effect; #if B_SHOW_SPLIT_ICON == TRUE ShowSplitIcon(GetBattleMoveSplit(move)); #endif PrintMovePowerAndAccuracy(move); - PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + + if (moveEffect != EFFECT_PLACEHOLDER) + PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0); + else + PrintTextOnWindow(windowId, gNotDoneYetDescription, 6, 1, 0, 0); } else { @@ -3981,7 +3988,7 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) case 0: if (gMain.inBattle) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], summary->species2, summary->pid); @@ -3990,14 +3997,14 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) { if (gMonSpritesGfxPtr != NULL) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], summary->species2, summary->pid); } else { - HandleLoadSpecialPokePic(&gMonFrontPicTable[summary->species2], + HandleLoadSpecialPokePic(TRUE, MonSpritesGfxManager_GetSpritePtr(MON_SPR_GFX_MANAGER_A, B_POSITION_OPPONENT_LEFT), summary->species2, summary->pid); diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index e0645bac0..0477ebbf5 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -534,7 +534,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], menu->monPicGfx[loadId], species, personality, TRUE); + LoadSpecialPokePic(menu->monPicGfx[loadId], species, personality, TRUE); LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), menu->monPal[loadId]); } diff --git a/src/strings.c b/src/strings.c index 92253de87..d199b92d4 100644 --- a/src/strings.c +++ b/src/strings.c @@ -417,6 +417,7 @@ const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNT const u8 gText_PkmnBecameHealthy[] = _("{STR_VAR_1} became healthy.{PAUSE_UNTIL_PRESS}"); const u8 gText_MovesPPIncreased[] = _("{STR_VAR_1}'s PP increased.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnElevatedToLvVar2[] = _("{STR_VAR_1} was elevated to\nLv. {STR_VAR_2}."); +const u8 gText_PkmnGainedExp[] = _("{STR_VAR_1} gained Exp. Points!{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnBaseVar2StatIncreased[] = _("{STR_VAR_1}'s base {STR_VAR_2}\nstat was raised.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnFriendlyBaseVar2Fell[] = _("{STR_VAR_1} turned friendly.\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnAdoresBaseVar2Fell[] = _("{STR_VAR_1} adores you!\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}"); diff --git a/src/trade.c b/src/trade.c index ad990e980..abf35f26a 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2734,7 +2734,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) species = GetMonData(mon, MON_DATA_SPECIES2); personality = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); sTradeData->monSpecies[whichParty] = species; @@ -3727,7 +3727,7 @@ static bool8 AnimateTradeSequenceCable(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); sTradeData->state++; } break; @@ -4224,7 +4224,7 @@ static bool8 AnimateTradeSequenceWireless(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], + HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 36cf70dce..dcc664718 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -59,11 +59,11 @@ static bool16 DecompressPic(u16 species, u32 personality, bool8 isFrontPic, u8 * { if (isFrontPic) { - LoadSpecialPokePic(&gMonFrontPicTable[species], dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } else { - LoadSpecialPokePic(&gMonBackPicTable[species], dest, species, personality, isFrontPic); + LoadSpecialPokePic(dest, species, personality, isFrontPic); } } else